when accessing a static property you need to use self::$varName instead of $this->varName. Same thing with static methods.
Edit:
Just to highlight some differences between abstract and static/non-static properties, I made a small example.
<?php
abstract class A{
public abstract function setValue($someValue);
public function test(){
echo '<pre>';
var_dump($this->childProperty);
var_dump(B::$childStatic);
echo '</pre>';
}
}
class B extends A{
protected $childProperty = 'property';
protected static $childStatic = 'static';
public function setValue($someValue){
$this->childProperty = $someValue;
self::$childStatic = $someValue;
}
}
//new instance of B
$X = new B();
//another new instance of B
$Y = new B();
//output the values
$X->test();
$Y->test();
//change the static and standard property in $X
$X->setValue("some new value");
//output the values again.
$X->test();
$Y->test();
?>
Output:
string(8) "property"
string(6) "static"
string(8) "property"
string(6) "static"
string(14) "some new value"
string(14) "some new value"
string(8) "property"
string(14) "some new value"
After you call setValue on $X, it you can see that the values of the static property change in both the instances while the non-static property changes only in that one instance.
Also, I just learned something. In a method of an abstract class trying to access a static child property, you have to specify the child class name to access the property, self:: doesn't work and throws an error.