Oop Articles

Using Traits for Code Reuse in Zend Framework 2

April 1, 2013

This is a post I’ve been meaning to write for a feels weeks now after I first started using Traits for simple reuse, as it solved a need I had at the time. After a while it seemed to be not too bad of a solution also. What Are Traits? If you’re not familiar with Traits the PHP manual describes them as: Traits are a mechanism for code reuse in single inheritance languages such as PHP.