@param ServiceLocatorInterface $serviceLocator

@return EntryToObjectsService
@throws \Zend\ServiceManager\Exception\ServiceNotFoundException
771032
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $appServiceLocator = $serviceLocator;
        if ($serviceLocator instanceof AbstractPluginManager) {
            $appServiceLocator = $serviceLocator->getServiceLocator();
        }



        $serializerManager = $appServiceLocator->get('SerializerAdapterManager');
        $moduleOptions = $appServiceLocator->get(ModuleOptions::class);
        $workflowService  = $appServiceLocator->get(Workflow::class);

        return new EntryToObjectsService(
            [
                'serializerManager' => $serializerManager,
                'moduleOptions' => $moduleOptions,
                'workflowService' => $workflowService
            ]
        );
    }
755880
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = new Configuration();

        $config->setGeneratorStrategy(new EvaluatingGeneratorStrategy());

        return new AccessInterceptorScopeLocalizerFactory($config);
    }
1103901
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $services = $serviceLocator->getServiceLocator();
        /* @var $translator \Zend\Mvc\I18n\Translator */
        $translator = $services->get('MvcTranslator');

        return new Translate($translator);
    }
471225
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        if ($serviceLocator instanceof ServiceLocatorAwareInterface) {
            $serviceLocator = $serviceLocator->getServiceLocator();
        }

        /** @var \Zend\View\HelperPluginManager $viewHelperManager */
        $viewHelperManager = $serviceLocator->get('ViewHelperManager');
        $postExtractor = new FeedEntry($viewHelperManager->getRenderer());

        return new Writer\Builder($postExtractor, new Mutator);
    }
657371
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $appServiceLocator = $serviceLocator;
        if ($serviceLocator instanceof AbstractPluginManager) {
            $appServiceLocator = $serviceLocator->getServiceLocator();
        }

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

        $resolverByModuleContextMap = new ResolverByClassName($moduleOptionsPluginManager);

        return $resolverByModuleContextMap;
    }
373199
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $inputFilter = $serviceLocator->getServiceLocator()->get('UghAuthentication\InputFilter\Login');

        $form = new LoginForm();
        $form->setInputFilter($inputFilter);
        $form->setValidationGroup(FormInterface::VALIDATE_ALL);

        return $form;
    }
1120614
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var ModuleOptionsPluginManagerInterface $moduleOptionsManager */
        $moduleOptionsManager = $serviceLocator->get(ModuleOptionsPluginManagerInterface::class);

        /** @var DoctrineObjectManagerInterface $doctrineObjectManager */
        $doctrineObjectManager = $serviceLocator->get(DoctrineObjectManagerInterface::class);

        return new ObjectManagerAutoDetector($moduleOptionsManager, $doctrineObjectManager);
    }
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);
    }
1078873
public function setServiceLocator(ServiceLocatorInterface $serviceLocator)
    {
        $this->serviceLocator = $serviceLocator;
        $this->callback = null;

        return $this;
    }
275175
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');
        $transportClass = 'Zend\\Mail\\Transport\\Sendmail';
        if(isset($config['contact']['transport_class']) && class_exists($config['contact']['transport_class'], true)){
            $transportClass = $config['contact']['transport_class'];
        }
        return new $transportClass($config);
    }
353376
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $pluginManagerClass = static::PLUGIN_MANAGER_CLASS;
        $plugins = new $pluginManagerClass;
        $plugins->setServiceLocator($serviceLocator);
        $configuration    = $serviceLocator->get('Config');

        if (isset($configuration['di']) && $serviceLocator->has('Di')) {
            $di = $serviceLocator->get('Di');
            $plugins->addAbstractFactory(
                new DiAbstractServiceFactory($di, DiAbstractServiceFactory::USE_SL_BEFORE_DI)
            );
        }

        return $plugins;
    }
113556
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $service = new ReportStatistics();
        /** @var Report $reportService */
        $reportService = $serviceLocator->get('KmbPuppetDb\Service\Report');
        $service->setReportService($reportService);
        return $service;
    }
1019435
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        if ($this->container !== null) {
            return $this->container;
        }

        $builder = new ContainerBuilder();
        $config = $this->getConfig($serviceLocator);
        $configFile = $this->getDefinitionsFilePath($config);
        $builder->addDefinitions($configFile);

        $useAnnotations = $this->shouldUseAnnotations($config);
        $builder->useAnnotations($useAnnotations);

        $acclimator = new ContainerAcclimator();
        $zfContainer = $acclimator->acclimate($serviceLocator);
        $builder->wrapContainer($zfContainer);

        /**
         * @var $cache Cache
         */
        $cache = $this->getCache($serviceLocator, $config);

        if ($cache) {
            $builder->setDefinitionCache($cache);
        }

        $this->container = $builder->build();

        return $this->container;
    }
612850
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $username = new Input();
        $username->setName('username');
        $username->setRequired(true);
        $username->setAllowEmpty(false);
        $username->getFilterChain()
                ->attach(new StringTrim())
                ->attach(new StripTags());

        $password = new Input();
        $password->setName('password');
        $password->setRequired(true);
        $password->setAllowEmpty(false);
        $password->getFilterChain()
                ->attach(new StringTrim())
                ->attach(new StripTags());
        $password->getValidatorChain()
                ->attach($serviceLocator->get('UghAuthentication\Authentication\Validator\Authentication'));

        $inputFilter = new InputFilter();
        $inputFilter->add($username);
        $inputFilter->add($password);

        return $inputFilter;
    }
736471
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /* @var $serviceLocator \Zend\ServiceManager\AbstractPluginManager */
        $parentLocator           = $serviceLocator->getServiceLocator();
        /* @var $inspectionsRepository InspectionRepositoryInterface */
        $inspectionsRepository   = $parentLocator->get(InspectionRepositoryInterface::class);
        /* @var $inspectionsListRenderer ListInspectionRenderer */
        $inspectionsListRenderer = $parentLocator->get(DetailInspectionRenderer::class);

        return new InspectionController($inspectionsRepository, $inspectionsListRenderer);
    }
1154900
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $service = new LogCollector();

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

        return $service;
    }
888912
public function setServiceLocator(ServiceLocatorInterface $serviceLocator)
    {
        /** @var ServiceManager $serviceLocator */
        $this->serviceManager = $serviceLocator;
        $this->serviceManager->setAllowOverride(true);
        $this->setPluginManager($serviceLocator);

        return $this;
    }