Possible Duplicate:
How do I get a PHP class constructor to call its parent's parent's constructor
I know this sounds strange, but I am trying to get around a bug. How can I call a grandparent method?
<?php
class Person {
function speak(){ echo 'person'; }
}
class Child extends Person {
function speak(){ echo 'child'; }
}
class GrandChild extends Child {
function speak(){
//skip parent, in order to call grandparent speak method
}
}
You can just call it explicitly;
parent is just a way to use the closest base class without using the base class name in more than one place, but giving any base class’ class name works just as well to use that instead of the immediate parent.