I\'ve never seen code like this:
public static function getInstance()
{
if ( ! isset(self::$_instance)) {
self::$_instance = new self();
}
If the class is inherited then calling getInstance() from child will not give you a instance of child. It will only returns an instance of parent instance. This is because we call new self().
If you want that the child class will return an instance of child class then use new static() in the getInstance() and it will then return the child class instance. This is called late binding!!