Possible duplicate:
Force parent method call
I have a class like this
abstract class theme{
abstract function header(){
}
abstract function footer(){
}
}
therefore, all child classes must have these 2 methods:
class Atheme extends theme{
function header(){
echo ..
}
function footer(){
echo ..
}
}
Now when I call one of these methods:
$atheme = new Atheme;
$atheme->header();
I want the header () method from the child class to automatically call the parent () method of the parent class without a special call to parent :: header () in the child class.
Is it possible?
source
share