Monday, December 8, 2014

Using Traits in Doctrine Entities

Since PHP 5.4.0, PHP supports a pretty way to reuse code called “Traits” - a set of methods that you can include within another class in order not to repeat yourself. You can read more about traits in previously published SitePoint posts: here, here and here.


Today, I am going to show you how they can be used with Doctrine ORM in a Symfony Environment.


Continue reading %Using Traits in Doctrine Entities%




by Nicolas Scolari via SitePoint

No comments:

Post a Comment