I have a superclass which contains properties & methods for setting them
class Super{
private $property;
function __construct($set){
$this->property = $set;
}
}
then I have a subclass that needs to use that property
class Sub extends Super{
private $sub_property
function __construct(){
parent::__construct();
$this->sub_property = $this->property;
}
}
but I keep getting an error
Notice: Undefined property: Sub::$property in sub.php on line 7
where am I going wrong?