This is a moronic question, but a quick answer would assist me.
if using an abstract class and then writing a class to extend the class:
it is my understanding that you have to specifically call the constructor class of the parent to get it to fire -
class absClass{
var $somedata
function absClass(){
$this->somedata = 0;
}
} // End absClass
class extClass extends absClass{
var $otherdata
function extClass(){
parent::absClass();
$this->otherdata = 0;
}
} // End extClass
however is this also the case if you want to overload member methods of the parent class like the following?
class absClass{
var $somedata
function absClass(){
$this->somedata = 0;
}
function setSomeData($data){
$this->somedata = $data;
}
} // End absClass
class extClass extends absClass{
var $otherdata
function extClass(){
parent::absClass();
$this->otherdata = 0;
}
function setSomeData($data){
parent::setSomeData()
// I might do more processing here since the class is extended
}
} // End extClass
Or am I missing the point completely (wouldn't be the first time)
Anyway thanks Ahead,
Geoffrey