public static function getInstance($scope = Doozr_Di_Constants::DEFAULT_SCOPE)
    {
        // Check if instance exists ...
        if (false === isset(self::$instances[$scope])) {
            self::$instances[$scope] = new self(
                $scope
            );
        }

        // Return instance
        return self::$instances[$scope];
    }
public static function getInstance($scope = Doozr_Di_Constants::DEFAULT_SCOPE)
    {
        // Check if instance exists ...
        if (false === isset(self::$instances[$scope])) {
            self::$instances[$scope] = new self(
                $scope
            );
        }

        // Return instance
        return self::$instances[$scope];
    }
public static function getInstance ( $ scope = Doozr_Di_Constants :: DEFAULT_SCOPE ) { // Check if instance exists ... if ( false === isset ( self :: $ instances [ $ scope ] ) ) { self :: $ instances [ $ scope ] = new self ( $ scope ) ; } // Return instance return self :: $ instances [ $ scope ] ; }
Singleton Constructor.

This method is intend to construct and return a singleton instance of Doozr_Di_Container. Each container
singleton is bound to a scope (eg. 'default'). By passing a scope through argument $scope you are able to
create more than one instance of container if needed/required by your application.

@param string $scope The scope of this instance

@author Benjamin Carl <opensource@clickalicious.de>

@return self Instance
@static
Singleton Constructor .