(non-PHPdoc)
@see \Zend\ServiceManager\Configuration::configureServiceManager()
497416
public function configureServiceManager(ZendServiceManager $serviceManager)
    {
        $pathManager = ($this->pathManagerConfig instanceof PathManager)? $this->pathManagerConfig : new PathManager($this->pathManagerConfig);
        $serviceManager->setService('rampage.PathManager', $pathManager, true);
        $serviceManager->setAlias('PathManager', 'rampage.PathManager');
        $serviceManager->setAllowOverride(true);

        parent::configureServiceManager($serviceManager);

        // Add the default delegator for the module manager
        if (!$serviceManager->has('rampage\core\services\ModuleManagerDelegator', false, false)) {
            $serviceManager->setInvokableClass('rampage\core\services\ModuleManagerDelegator', 'rampage\core\services\ModuleManagerDelegator');
        }

        $serviceManager->addDelegator('ModuleManager', 'rampage\core\services\ModuleManagerDelegator');
        $serviceManager->addPeeringServiceManager($serviceManager->get('AggregatedServiceLocator'));

        return $this;
    }
1199090
public function setupService($service, array $config)
    {
        $app = $this->getApp();

        $app->container->set(
            '@' . $service,
            new ServiceDefinition($this, $service, $config)
        );
    }
283618
def _configure_services(self, configs):
        """"""
        for service, config in six.iteritems(configs):
            self.d.configure(service, config)
1179410
public function setService()
    {
        $serviceData = $this->getConfig('service.' . $this->service);
        foreach ($serviceData as $key => $value) {
            Arr::set($this->serviceData, $key, $value);
        }
        Arr::forget($this->configData,'service');
        return $this;
    }
52291
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $pluginManagerClass = static::PLUGIN_MANAGER_CLASS;
        /* @var $plugins \Zend\ServiceManager\AbstractPluginManager */
        $plugins = new $pluginManagerClass();
        $plugins->setServiceLocator($serviceLocator);

        return $plugins;
    }
1223596
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var array $config */
        $config = $serviceLocator->get('Config')['eye4web_abac']['assertion_manager'];

        $pluginManager = new AssertionPluginManager(new Config($config));
        $pluginManager->setServiceLocator($serviceLocator);

        return $pluginManager;
    }
1317025
public function getServiceManager()
    {
        $serviceManager = $this->getServiceLocator();
        if ($serviceManager instanceof ServiceManager) {
            return $serviceManager;
        }
        $msg = is_null($serviceManager)
            ? 'ServiceLocator not initialized for '.get_class($this)
            : 'Alternate service locator not compatible with getServiceManager() in ' . __CLASS__;
        throw new InvalidServiceManagerException($msg);
    }
1216068
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $this->getConfig($serviceLocator);

        if (!isset($config['cache'])) {
            return null;
        }

        $config = $config['cache'];
        /* @var $cache CacheProvider|Cache */
        $cache = null;
        $cacheFactory = $this->getCacheFactory($config);
        $cache = $cacheFactory->newInstance($config);

        if (isset($config['namespace'])) {
            $cache->setNamespace(trim($config['namespace']));
        }

        return $cache;
    }
1027104
function setServiceManagerConfig(array $smConfig)
    {
        if ($this->sm instanceof ServiceLocatorInterface)
            throw new \Exception(
                'Service Config is used on first time instancing, '
                .'Service Manager is configured for now you must use "getServiceManager()"'
            );

        $this->def_sm_config = Core\array_merge(
            $this->def_sm_config
            , $smConfig
        );

        return $this;
    }
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);
    }
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);
    }
1318686
public function createService(ServiceLocatorInterface $controllerManager)
    {
        /** @var ServiceLocatorInterface $serviceManager */
        $serviceManager = $controllerManager->getServiceLocator();

        /** @var \Eye4web\Zf2Board\Options\ModuleOptions $moduleOptions */
        $moduleOptions = $serviceManager->get('Eye4web\Zf2Board\Options\ModuleOptions');

        /** @var \Eye4web\Zf2Board\Service\BoardService $boardService */
        $boardService = $serviceManager->get('Eye4web\Zf2Board\Service\BoardService');

        /** @var \Eye4web\Zf2Board\Service\TopicService $topicService */
        $topicService = $serviceManager->get('Eye4web\Zf2Board\Service\TopicService');

        /** @var \Eye4web\Zf2Board\Service\PostService $postService */
        $postService = $serviceManager->get('Eye4web\Zf2Board\Service\PostService');

        /** @var \Zend\Form\Form $topicCreateForm */
        $topicCreateForm = $serviceManager->get('Eye4web\Zf2Board\Form\Topic\CreateForm');

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

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

        /** @var \Zend\Authentication\AuthenticationService $authenticationService */
        $authenticationService = $serviceManager->get($moduleOptions->getAuthenticationService());

        $controller = new BoardController(
            $boardService,
            $topicService,
            $postService,
            $topicCreateForm,
            $postCreateForm,
            $postEditForm,
            $authenticationService,
            $moduleOptions
        );

        /** @var \Zend\EventManager\EventManager $eventManager */
        $eventManager = $serviceManager->get('EventManager');

        $controller->setEventManager($eventManager);

        return $controller;
    }
233700
public static function init($config = null)
    {
        self::registerDevelopmentErrorHandler();
        self::registerExceptionHandler();

        if ($config === null) {
            $config = static::loadAppConfig();
        }

        static::addCoreModule($config);

        $serviceConfig = isset($config['service_manager']) ? $config['service_manager'] : array();
        $listeners = isset($config['listeners'])? $config['listeners'] : array();
        $serviceManager = new ServiceManager(new ServiceConfig($serviceConfig));

        $serviceManager->setService('ApplicationConfig', $config);
        $serviceManager->get('ModuleManager')->loadModules();

        return $serviceManager->get('Application')->bootstrap($listeners);
    }
517837
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var \GkSmarty\ModuleOptions $options */
        $options = $serviceLocator->get('GkSmarty\ModuleOptions');
        $smartyManagerOptions = $options->getHelperManager();
        $smartyManagerConfigs = isset($smartyManagerOptions['configs']) ? $smartyManagerOptions['configs'] : array();

        $zfManager = $serviceLocator->get('ViewHelperManager');
        $smartyManager = new HelperPluginManager(new Config($smartyManagerOptions));
        $smartyManager->setServiceLocator($serviceLocator);
        $smartyManager->addPeeringServiceManager($zfManager);

        foreach ($smartyManagerConfigs as $configClass) {
            if (is_string($configClass) && class_exists($configClass)) {
                $config = new $configClass;

                if (!$config instanceof ConfigInterface) {
                    throw new Exception\RuntimeException(
                        sprintf(
                            'Service manager configuration classes must implement %s; received %s',
                            'Zend\ServiceManager\ConfigInterface',
                            is_object($configClass) ? get_class($configClass) : gettype($configClass)
                        )
                    );
                }

                $config->configureServiceManager($smartyManager);
            }
        }

        return $smartyManager;
    }
109866
public function configure() {
		$config = $this->mergeConfigs($this->configReaders);
		
		if (isset($config->parameters)) {
			$this->applyParameters($config->parameters);
		}
		
		if (isset($config->services)) {
			$this->applyServices($config->services);
		}
		
		if (isset($config->initializers)) {
			$this->applyInitializers($config->initializers);
		}
		
		return $this->container;
	}
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
        );
    }
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;
    }