@param ServiceLocatorInterface $serviceLocator

@return WorkflowDispatchListener
@throws \Zend\ServiceManager\Exception\ServiceNotFoundException
331634
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var Dispatcher $dispatcher */
        $dispatcher = $serviceLocator->get(Dispatcher::class);

        $options = [
            'dispatcher' => $dispatcher
        ];

        return new WorkflowDispatchListener($options);
    }
749220
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var EntryToObjectsService $entryToObjectsService */
        $entryToObjectsService = $serviceLocator->get(EntryToObjectsService::class);

        /** @var Workflow $workflowService */
        $workflowService = $serviceLocator->get(Workflow::class);

        $initOptions = [
            'entryToObjectsService' => $entryToObjectsService,
            'workflowService'       => $workflowService
        ];

        return new WorkflowTools($initOptions);
    }
872787
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var \Eye4web\Zf2Board\Options\ModuleOptions $options */
        $options = $serviceLocator->get('Eye4web\Zf2Board\Options\ModuleOptions');

        /** @var \Eye4web\Zf2Board\Mapper\PostMapperInterface $mapper */
        $mapper = $serviceLocator->get($options->getPostMapper());

        /** @var Form $postCreateForm */
        $postCreateForm = $serviceLocator->get('Eye4web\Zf2Board\Form\Post\CreateForm');

        /** @var Form $postEditForm */
        $postEditForm = $serviceLocator->get('Eye4web\Zf2Board\Form\Post\EditForm');

        $service = new PostService($mapper, $postCreateForm, $postEditForm);

        return $service;
    }
760604
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        if ($serviceLocator instanceof AbstractPluginManager) {
            $serviceLocator = $serviceLocator->getServiceLocator();
        }

        $container = $this->getContainer($serviceLocator);
        $plugin = new ToastViewHelper($container);

        return $plugin;
    }
578814
public function createService(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');
        $driver = new $config['ga-goo-gl']['client'];
        $driver->setAdapter($config['ga-goo-gl']['adapter']);
        $driver->setHeaders(array(
            'Content-Type' => 'application/json'
        ));
        $service = new Request();
        $service->setClient($driver);
        return $service;
    }
457589
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /**
         * @var array $config
         */
        $config = $serviceLocator->get('config');

        /**
         * @var \Zend\View\HelperPluginManager $serverUrl
         */
        $serverUrl = $serviceLocator->get('ViewHelperManager');

        /**
         * @var \Zend\Mvc\I18n\Translator $translator
         */
        $translator = $serviceLocator->get('translator');

        return new Search(
            $config,
            $serverUrl,
            $translator
        );
    }
566337
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $serviceLocator = $serviceLocator->getServiceLocator();
        $helper = new GlobalMessenger();
        $controllerPluginManager = $serviceLocator->get('ControllerPluginManager');
        $globalMessenger = $controllerPluginManager->get('globalMessenger');
        $helper->setPluginGlobalMessenger($globalMessenger);
        $config = $serviceLocator->get('Config');
        if (isset($config['view_helper_config']['flashmessenger'])) {
            $configHelper = $config['view_helper_config']['flashmessenger'];
            if (isset($configHelper['message_open_format'])) {
                $helper->setMessageOpenFormat($configHelper['message_open_format']);
            }
            if (isset($configHelper['message_separator_string'])) {
                $helper->setMessageSeparatorString($configHelper['message_separator_string']);
            }
            if (isset($configHelper['message_close_string'])) {
                $helper->setMessageCloseString($configHelper['message_close_string']);
            }
        }

        return $helper;
    }
1078873
public function setServiceLocator(ServiceLocatorInterface $serviceLocator)
    {
        $this->serviceLocator = $serviceLocator;
        $this->callback = null;

        return $this;
    }
1294711
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        return new ProcessViewController(
            $serviceLocator->getServiceLocator()->get('prooph.link.monitor.process_logger'),
            $serviceLocator->getServiceLocator()->get('prooph.link.monitor.process_stream_reader'),
            ScriptLocation::fromPath(Definition::getScriptsDir()),
            $serviceLocator->getServiceLocator()->get('prooph.link.app.location_translator')
        );
    }
148016
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');

        $service = new ModuleOptions($config['e4wzfcuserredirecturl']);
        return $service;
    }
274073
public function setServiceLocator( ServiceLocatorInterface $serviceLocator )
    {
        if ( null === $this->serviceLocator )
        {
            $this->setExactServiceLocator( $serviceLocator );
        }

        return $this;
    }
1235932
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var \Eye4web\Zf2Board\Options\ModuleOptions $options */
        $options = $serviceLocator->get('Eye4web\Zf2Board\Options\ModuleOptions');

        /** @var \Zend\Authentication\AuthenticationService $service */
        $service = $serviceLocator->get($options->getAuthenticationService());

        return $service;
    }
70910
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $plugins = parent::createService($serviceLocator);
        $plugins->addPeeringServiceManager($serviceLocator);
        $plugins->setRetrieveFromPeeringManagerFirst(true);

        return $plugins;
    }
1307839
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var EntityManagerInterface $objectManager */
        $objectManager = $serviceLocator->get('Doctrine\ORM\EntityManager');

        /** @var ValidatorPluginManager $validatorPluginManager */
        $validatorPluginManager = $serviceLocator->get('ValidatorManager');

        return new DoctrineORMProvider($objectManager, $validatorPluginManager);
    }
444029
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var \Eye4web\Zf2Board\Options\ModuleOptions $options */
        $options = $serviceLocator->get('Eye4web\Zf2Board\Options\ModuleOptions');

        /** @var \Eye4web\Zf2Board\Mapper\BoardMapperInterface $mapper */
        $mapper = $serviceLocator->get($options->getBoardMapper());

        $service = new BoardService($mapper);

        return $service;
    }
920443
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $appServiceLocator = $serviceLocator;
        if ($serviceLocator instanceof AbstractPluginManager) {
            $appServiceLocator = $serviceLocator->getServiceLocator();
        }


        /** @var EntryToObjectsService $entryToObjectsService */
        $entryToObjectsService = $appServiceLocator->get(EntryToObjectsService::class);

        $options = [
            'entryToObjectsService' => $entryToObjectsService
        ];

        return new EntryToObjectsControllerPlugin($options);
    }
219538
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /* @var $options ModuleOptionsInterface */
        $options = $serviceLocator->get(ModuleOptions::class);

        $chain = new AdapterChain;
        $eventManager = $chain->getEventManager();

        // iterate and attach multiple adapters and events if offered
        foreach ($options->getAuthenticationAdapters() as $priority => $adapterName) {
            $adapter = $serviceLocator->get($adapterName);
            if (is_callable(array($adapter, 'authenticate'))) {
                $eventManager->attach('authenticate', [$adapter, 'authenticate'], $priority);
            }
            if (is_callable(array($adapter, 'logout'))) {
                $eventManager->attach('logout', [$adapter, 'logout'], $priority);
            }
        }

        return $chain;
    }