Liquid Fire Posted April 23, 2007 Share Posted April 23, 2007 Ok i have a question about these methods when it comes to shild classes. I have class B that extands class a Lets say i have declared __call if both class a and b. Now when i call $b->GetList(); which is picked up by the __call method does that automatically get picked up by class b's __call? is this the the same with __get and __set? If i want to call the the parent's(class a) _call method i can just put parent::__call(); inside the child's class __call method, right? Link to comment https://forums.phpfreaks.com/topic/48295-question-about-__get-__set-__call/ Share on other sites More sharing options...
Jenk Posted April 23, 2007 Share Posted April 23, 2007 yes, or not overload the method. <?php class A { public function __call($name, $args) { // etc. } } class B extends A { } $b = new B; $b->SomeMethod(); ?> Link to comment https://forums.phpfreaks.com/topic/48295-question-about-__get-__set-__call/#findComment-236146 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.