protected static function getInstance()
    {
        $class = get_called_class();

        if (!isset(self::$instance[$class]) || !self::$instance[$class] instanceof $class) {
            self::$instance[$class] = new static();
        }

        return static::$instance[$class];
    }
protected static function getInstance()
    {
        $class = get_called_class();

        if (!isset(self::$instance[$class]) || !self::$instance[$class] instanceof $class) {
            self::$instance[$class] = new static();
        }

        return static::$instance[$class];
    }
protected static function getInstance ( ) { $ class = get_called_class ( ) ; if ( ! isset ( self :: $ instance [ $ class ] ) || ! self :: $ instance [ $ class ] instanceof $ class ) { self :: $ instance [ $ class ] = new static ( ) ; } return static :: $ instance [ $ class ] ; }
Returns the singleton instance.

@return self
Returns the singleton instance .