oop - Without using a wrapper class, can I load multiple (non-hierarcical) children classes in PHP? -
right have class gathers , holds information specific program runs in multiple instances on machine streaming few radio stations.
what waned have separate children classes have different aspects of i'd want do. example
- child class 1, allow sending commands running instance
- child class 2, query program pulling meta data , playlist history
now scripts 1 of things, except of few i'd want have access both of children classes.
is there way without having child 1 extend child 2 extends parent, have instance includes both children, or hierarchical option in php doing this?
i think can move logic traits (http://php.net/manual/en/language.oop5.traits.php) , include them in required classes. make sense?
Comments
Post a Comment