Creates Service

@param ServiceLocatorInterface $serviceLocator Zend Service Locator

@return \Reliv\RcmConfig\Service\ConfigService
172410
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('config');

        return new \Reliv\RcmConfig\Service\ConfigService(
            $config,
            $serviceLocator
        );
    }
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);
    }
1179289
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config          = $serviceLocator->get('Config');
        $bootstrapConfig = !empty($config['twitter_bootstrap']) ? $config['twitter_bootstrap'] : array();

        return new ModuleOptions($bootstrapConfig);
    }
272531
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /**
         * @var \Zend\ServiceManager\ServiceLocatorAwareTrait $serviceLocator
         */
        $sl = $serviceLocator->getServiceLocator();

        /**
         * @var \Mp3\InputFilter\Search $inputFilterSearch
         */
        $inputFilterSearch = $sl->get('InputFilterManager')
                                ->get('Mp3\InputFilter\Search');

        /**
         * @var \Mp3\Form\Search $formSearch
         */
        $formSearch = $sl->get('FormElementManager')
                         ->get('Mp3\Form\Search');

        /**
         * @var \Mp3\Service\Search $serviceSearch
         */
        $serviceSearch = $sl->get('Mp3\Service\Search');

        return new SearchController(
            $inputFilterSearch,
            $formSearch,
            $serviceSearch
        );
    }
1166811
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var HelperPluginManager $serviceLocator */
        $mainServiceManager = $serviceLocator->getServiceLocator();

        $helper = new EnvironmentSelect();

        /** @var EnvironmentRepositoryInterface $environmentRepository */
        $environmentRepository = $mainServiceManager->get('EnvironmentRepository');
        $helper->setEnvironmentRepository($environmentRepository);

        /** @var Application $application */
        $application = $mainServiceManager->get('Application');
        $helper->setRouteMatch($application->getMvcEvent()->getRouteMatch());

        return $helper;
    }
782535
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /**
         * @var \Zend\ServiceManager\ServiceLocatorAwareTrait $serviceLocator
         */
        $sl = $serviceLocator->getServiceLocator();

        /**
         * @var \Mp3\Form\Search $formSearch
         */
        $formSearch = $sl->get('FormElementManager')
                         ->get('Mp3\Form\Search');

        /**
         * @var \Mp3\Service\Index $serviceIndex
         */
        $serviceIndex = $sl->get('Mp3\Service\Index');

        return new IndexController(
            $formSearch,
            $serviceIndex
        );
    }
621151
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        return \Prooph\Link\Application\Model\ProcessingConfig::asProjectionFrom($serviceLocator->get('prooph.link.app.config_location'));
    }
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);
    }
1282748
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $services = $serviceLocator->getServiceLocator();
        return new JQuery(
            $services->get(ModuleOptions::class),
            $services->get('JQueryPluginManager')
        );
    }
483552
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $snippetHelper = new SnippetHelper();

        // Get the top level service locator
        $serviceManager = $serviceLocator;
        if ($serviceManager instanceof HelperPluginManager) {
            $serviceManager = $serviceManager->getServiceLocator();
        }

        if (!$serviceManager->has('Config')) {
            return $snippetHelper;
        }


        $config = $serviceManager->get('Config');

        $snippetsConfig = isset($config[$this->configKey]) ? $config[$this->configKey] : [];

        if (!isset($snippetsConfig['snippets'])) {
            return $snippetHelper;
        }

        $snippets = $snippetsConfig['snippets'];


        if (!is_array($snippets)) {
            return $snippetHelper;
        }

        return $this->configureSnippetHelper($snippetHelper, $config, $snippetsConfig);

    }
1341686
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('Config');
        $appConfigConfiguration = isset($config['rumeaulib_appconfig']) ? $config['rumeaulib_appconfig'] : [];

        $service = new AppConfig($serviceLocator, $appConfigConfiguration);

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

        /** @var array $appConfig */
        $appConfig = $appServiceLocator->get('config');
        $moduleConfig = array_key_exists(Module::CONFIG_KEY, $appConfig) ? $appConfig[Module::CONFIG_KEY] : [];

        return new ModuleOptions($moduleConfig);
    }
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;
    }
1326494
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config     = $serviceLocator->get('Config');
        $appRootDir = $config['parameters']['app.root_dir'];

        return new FileLocator($serviceLocator->get('ModuleManager'), $appRootDir);
    }
1303945
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $services = $serviceLocator->getServiceLocator();
        return $this->configureElement($serviceLocator->get('File'), $services);
    }
1319332
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $service = new Environment();

        /** @var EnvironmentRepositoryInterface $environmentRepository */
        $environmentRepository = $serviceLocator->get('EnvironmentRepository');
        $service->setEnvironmentRepository($environmentRepository);

        return $service;
    }
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;
    }