The recent release of PHP 5.4 includes a new feature called Traits. It enables method injection into classes and the concept will be familiar to anyone who has experience with Ruby's mixins or traits in Scala. CakePHP's 'Model Behaviour' functionality is also influenced by the concept of traits and mixins. Traits are similar to abstract classes, however they are particularly useful when a method has applications across a wide area of concerns. They can be

Read more 1