Zend\Mvc\Service\ModuleManagerFactory::createService PHP Method

createService() public method

For use with zend-servicemanager v2; proxies to __invoke().
public createService ( Zend\ServiceManager\ServiceLocatorInterface $container ) : Zend\ModuleManager\ModuleManager
$container Zend\ServiceManager\ServiceLocatorInterface
return Zend\ModuleManager\ModuleManager
    public function createService(ServiceLocatorInterface $container)
    {
        return $this($container, ModuleManager::class);
    }

Usage Example

 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $moduleManager = parent::createService($serviceLocator);
     $events = $moduleManager->getEventManager();
     $events->attach(ModuleEvent::EVENT_LOAD_MODULES, array($this, 'onLoadModules'), 1000);
     return $moduleManager;
 }
All Usage Examples Of Zend\Mvc\Service\ModuleManagerFactory::createService
ModuleManagerFactory