diff --git a/library/Zend/Mvc/Service/ServiceManagerConfig.php b/library/Zend/Mvc/Service/ServiceManagerConfig.php index 72f03c175d2..4b621b0cc81 100644 --- a/library/Zend/Mvc/Service/ServiceManagerConfig.php +++ b/library/Zend/Mvc/Service/ServiceManagerConfig.php @@ -115,6 +115,10 @@ public function __construct(array $configuration = array()) }, ); + $this->factories['ServiceManager'] = function (ServiceLocatorInterface $serviceLocator) { + return $serviceLocator; + }; + $configuration = array_replace_recursive(array( 'invokables' => $this->invokables, 'factories' => $this->factories, @@ -127,22 +131,4 @@ public function __construct(array $configuration = array()) parent::__construct($configuration); } - - /** - * Configure the provided service manager instance with the configuration - * in this class. - * - * In addition to using each of the internal properties to configure the - * service manager, also adds an initializer to inject ServiceManagerAware - * and ServiceLocatorAware classes with the service manager. - * - * @param ServiceManager $serviceManager - * @return void - */ - public function configureServiceManager(ServiceManager $serviceManager) - { - parent::configureServiceManager($serviceManager); - - $serviceManager->setService('ServiceManager', $serviceManager); - } }