note 105723 deleted from language.oop5.traits by danbrown
| From: | danbrown@php.net | Date: | Fri, 09 Sep 2011 17:12:18 +0000 |
| Subject: | note 105723 deleted from language.oop5.traits by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-183068@lists.php.net to get a copy of this message | ||
Note Submitter: c dot f dot keeley at gmail dot com
----
I'm no expert so please forgive me if I'm wrong but is not simply easier, more powerful
and more flexible to achieve similar results using object composition via dependency injection
(constructor, mutator et al)?
IMHO class extension by object composition allows you to vary the implementation of object instances
at runtime giving the programmer the most flexibility and scope.