Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Mvc / Service / DiAbstractServiceFactoryFactory.php
blob0f5168809a082fe5eaf5d59973c7c3821e70d270
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Mvc\Service;
12 use Zend\ServiceManager\Di\DiAbstractServiceFactory;
13 use Zend\ServiceManager\FactoryInterface;
14 use Zend\ServiceManager\ServiceLocatorInterface;
15 use Zend\ServiceManager\ServiceManager;
17 class DiAbstractServiceFactoryFactory implements FactoryInterface
19 /**
20 * Class responsible for instantiating a DiAbstractServiceFactory
22 * @param ServiceLocatorInterface $serviceLocator
23 * @return DiAbstractServiceFactory
25 public function createService(ServiceLocatorInterface $serviceLocator)
27 $factory = new DiAbstractServiceFactory($serviceLocator->get('Di'), DiAbstractServiceFactory::USE_SL_BEFORE_DI);
29 if ($serviceLocator instanceof ServiceManager) {
30 /* @var $serviceLocator ServiceManager */
31 $serviceLocator->addAbstractFactory($factory, false);
34 return $factory;