You can imitate such a feature for class-properties, by using the PHP-magic-function __set() and setting the respective property to private/protected.
class MyClass
{
private $a;
public function __set($classProperty, $value)
{
if($classProperty == 'a')
{
// your overloadis()-logic here, e.g.
// if($value instanceof SomeOtherClass)
// $this->$classProperty = $value;
}
}
}
$myClassInstance = new MyClass();
$myClassInstance->a = new SomeOtherClass();
$myClassInstance->a = 'c';