Create service

@param ServiceLocatorInterface $serviceLocator
@return mixed
480034
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /* @var $serviceLocator \Zend\Mvc\Controller\ControllerManager */
        $sm = $serviceLocator->getServiceLocator();

        $pluginManager = $sm->get('HumusSupervisorModule\\ListenerManager');

        $controller = new ListenerController();
        $controller->setListenerManager($pluginManager);

        return $controller;
    }
1137420
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $this->serviceLocator = $serviceLocator;

        $acl = $this->serviceLocator->getServiceLocator()
            ->get(Acl::class);

        $identity = $this->getIdentityHelper();

        $role = ($identity()) ? $identity()->getRole() : 'guest';

        $service = new Navigation();
        $service->setAcl($acl);
        $service->setRole($role);

        $service->setServiceLocator($this->serviceLocator->getServiceLocator());

        return $service;
    }
1250936
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $plugin = new CustomGroups();
        $config = $serviceLocator->getServiceLocator()->get('Config');
        if (isset($config['custom_groups'])) {
            $plugin->setConfig($config['custom_groups']);
        }
        return $plugin;
    }
72672
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $resource = new MessageHandler();

        $resource->setFinder($serviceLocator->getServiceLocator()->get(MessageHandlerFinder::class));

        return $resource;
    }
1335837
public function createService(ServiceLocatorInterface $serviceLocator)
    {

        /** @var ApiProblemRenderer $apiProblemRenderer */
        $apiProblemRenderer = $serviceLocator->get(ApiProblemRenderer::class);

        $renderer = new WorkflowDescriptorApiRenderer($apiProblemRenderer);
        return $renderer;
    }
1253913
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var $env Environment */
        $env = $serviceLocator->get(Definition::SERVICE_ENVIRONMENT);

        return new WorkflowProcessor(
            $env->getNodeName(),
            $env->getEventStore(),
            $env->getProcessRepository(),
            $env->getWorkflowEngine(),
            $env->getProcessFactory()
        );
    }
812710
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var DoctrineObjectManagerInterface $doctrineObjectManager */
        $doctrineObjectManager = $serviceLocator->get(DoctrineObjectManagerInterface::class);

        /** @var ModuleOptionsPluginManagerInterface $moduleOptionsPluginManager */
        $moduleOptionsPluginManager = $serviceLocator->get(ModuleOptionsPluginManagerInterface::class);

        /** @var EntityManagerInterface $entityManager */
        $entityManager = $serviceLocator->get(EntityManagerInterface::class);

        return new EntityMapBuilder($doctrineObjectManager, $moduleOptionsPluginManager, $entityManager);
    }
113556
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $service = new ReportStatistics();
        /** @var Report $reportService */
        $reportService = $serviceLocator->get('KmbPuppetDb\Service\Report');
        $service->setReportService($reportService);
        return $service;
    }
52291
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $pluginManagerClass = static::PLUGIN_MANAGER_CLASS;
        /* @var $plugins \Zend\ServiceManager\AbstractPluginManager */
        $plugins = new $pluginManagerClass();
        $plugins->setServiceLocator($serviceLocator);

        return $plugins;
    }
1162223
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $helper = new UrlHelper();
        $router = Console::isConsole() ? 'HttpRouter' : 'Router';

        if ($serviceLocator instanceof AbstractPluginManager) {
            $serviceLocator = $serviceLocator->getServiceLocator();
        }

        $helper->setRouter($serviceLocator->get($router));
        $match = $serviceLocator->get('application')
            ->getMvcEvent()
            ->getRouteMatch();

        if ($match instanceof RouteMatch) {
            $helper->setRouteMatch($match);
        }

        return $helper;
    }
1344435
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');
        $config = $config['cronModule'];

        return new CronService(new Configuration($config));
    }
442536
public function createService(ServiceLocatorInterface $serviceManager)
    {
        $serviceLocator = $serviceManager->getServiceLocator();

        return $this->__invoke($serviceLocator, null);
    }
1154900
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $service = new LogCollector();

        /** @var LogRepositoryInterface $logRepository */
        $logRepository = $serviceLocator->get('LogRepository');
        $service->setLogRepository($logRepository);

        return $service;
    }
148016
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');

        $service = new ModuleOptions($config['e4wzfcuserredirecturl']);
        return $service;
    }
898784
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');
        $modelConfig = [];
        if (isset($config['matryoshka']) && isset($config['matryoshka']['model_manager'])) {
            $modelConfig = $config['matryoshka']['model_manager'];
        }
        return new ModelManager(new Config($modelConfig));
    }
849145
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $taskResource = new Task();
        $taskResource->setTaskFinder($serviceLocator->getServiceLocator()->get(TaskFinder::class));
        return $taskResource;
    }
221231
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var $env Environment */
        $env = $serviceLocator->get('processing.env');

        return new ProcessFactory($env->getConfig()->arrayValue('processes'));
    }