If you call a static getInstance() function to create a instance of a class from another class, this function have to be static, if it is not static the original name of the caller class and not of the current class get returned.
example:
<?php
class a {
function getXName() {
return x::getClassName();
}
function getXStaticName() {
return x::getStaticClassName();
}
}
class b extends a {
}
class x {
public function getClassName() {
return get_called_class();
}
public static function getStaticClassName() {
return get_called_class();
}
}
$a = new a();
$b = new b();
echo $a->getXName(); echo $b->getXName(); echo $a->getXStaticName(); echo $b->getXStaticName(); ?>