protected function initializeProxy($typeName, callable $factory = NULL)
	{
		$proxyName = $this->container->loadScopedProxy($typeName);
		
		if($factory === NULL)
		{
			$factory = function() {
				throw new ScopeNotActiveException(sprintf('Scope "%s" is not active', $this->getScope()));
			};
		}
		
		return new $proxyName(new DelegateBinding($typeName, $this->getScope(), 0, $factory), $this, $this->proxies);
	}
protected function initializeProxy($typeName, callable $factory = NULL)
	{
		$proxyName = $this->container->loadScopedProxy($typeName);
		
		if($factory === NULL)
		{
			$factory = function() {
				throw new ScopeNotActiveException(sprintf('Scope "%s" is not active', $this->getScope()));
			};
		}
		
		return new $proxyName(new DelegateBinding($typeName, $this->getScope(), 0, $factory), $this, $this->proxies);
	}
protected function initializeProxy ( $ typeName , callable $ factory = NULL ) { $ proxyName = $ this -> container -> loadScopedProxy ( $ typeName ) ; if ( $ factory === NULL ) { $ factory = function ( ) { throw new ScopeNotActiveException ( sprintf ( 'Scope "%s" is not active' , $ this -> getScope ( ) ) ) ; } ; } return new $ proxyName ( new DelegateBinding ( $ typeName , $ this -> getScope ( ) , 0 , $ factory ) , $ this , $ this -> proxies ) ; }
Create a scoped proxy for the given type.

@param string $typeName
@param callable $factory Will be called when the proxy is activated.
@return ScopedProxyInterface
Create a scoped proxy for the given type .