astralaaron Posted February 27, 2012 Share Posted February 27, 2012 I know an extended class can use methods from the parent class with parent::method(); but can an extended class call a method from another extended class of the parent or does that not even make sense? Link to comment Share on other sites More sharing options...
boen_robot Posted February 27, 2012 Share Posted February 27, 2012 In short: No, and that doesn't quite make sense.In PHP 5.4, there's traits, that serve a similar purpose - a trait is a lot like an abstract class. A class would be able to "use" one or more traits, and any extended classes will have access to all traits of their parent class, as well as any traits they themselves might use. So as long as a trait is in a parent class, an extended class will have it, but if not, it could explicitly use a different trait that may happen to also be used by another class. Link to comment Share on other sites More sharing options...
astralaaron Posted February 29, 2012 Author Share Posted February 29, 2012 thanks I got it. I just got a little unorganized Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.