public static function generalServiceManager(Iterable $serviceConfig = NULL, $selfRefNames= []) {
        if(!static::$serviceManager) {
            if(is_null($serviceConfig))
                throw new ServiceException(sprintf("First call of %s must pass a service configuration", __METHOD__), 13);

            /** @var ServiceManager $man */
            $man = static::$serviceManager = new static($serviceConfig);
            $man->selfReferenceNames = array_merge($man->selfReferenceNames, $selfRefNames);

            if($n = self::getGlobalVariableName())
                $GLOBALS[$n] = $man;
        }
        return static::$serviceManager;
    }
public static function generalServiceManager(Iterable $serviceConfig = NULL, $selfRefNames= []) {
        if(!static::$serviceManager) {
            if(is_null($serviceConfig))
                throw new ServiceException(sprintf("First call of %s must pass a service configuration", __METHOD__), 13);

            /** @var ServiceManager $man */
            $man = static::$serviceManager = new static($serviceConfig);
            $man->selfReferenceNames = array_merge($man->selfReferenceNames, $selfRefNames);

            if($n = self::getGlobalVariableName())
                $GLOBALS[$n] = $man;
        }
        return static::$serviceManager;
    }
public static function generalServiceManager ( Iterable $ serviceConfig = NULL , $ selfRefNames = [ ] ) { if ( ! static :: $ serviceManager ) { if ( is_null ( $ serviceConfig ) ) throw new ServiceException ( sprintf ( "First call of %s must pass a service configuration" , __METHOD__ ) , 13 ) ; /** @var ServiceManager $man */ $ man = static :: $ serviceManager = new static ( $ serviceConfig ) ; $ man -> selfReferenceNames = array_merge ( $ man -> selfReferenceNames , $ selfRefNames ) ; if ( $ n = self :: getGlobalVariableName ( ) ) $ GLOBALS [ $ n ] = $ man ; } return static :: $ serviceManager ; }
Returns the service manager. The first call of this method should pass a service config info.
@param iterable|NULL $serviceConfig
@return ServiceManager
Returns the service manager . The first call of this method should pass a service config info .