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 [...]
