Ask for the service container identifier.

@param null $service
The service name without having to prompt.

@return bool|string
328247
protected function askForServiceContainerId($service = null)
    {
        if (!isset($service)) {
            $service = $this->askForServiceName();
        }
        $container_id = $this->getServiceContainerId($service);

        if ($container_id === false) {
            throw new EngineRuntimeException(
                sprintf('Unable to obtain the container identifier for the %s service.', $service)
            );
        }

        return $container_id;
    }
1328825
protected function resolveDatabaseImportCommand($service = null)
    {
        /** @var ServiceDbInterface $instance */
        $instance = $this->resolveDatabaseServiceInstance($service);

        /** @var DatabaseInterface $database */
        $database = $this->getDatabaseInfo($instance);

        switch ($database->getProtocol()) {
            case 'mysql':
                return (new MysqlCommand())
                    ->host($database->getHostname())
                    ->username($database->getUser())
                    ->password($database->getPassword())
                    ->database($database->getDatabase());
            case 'pgsql':
                return (new PgsqlCommand())
                    ->host($database->getHostname())
                    ->username($database->getUser())
                    ->password($database->getPassword())
                    ->database($database->getDatabase());
        }
    }
1346490
public function handleService($service, $resource = null)
    {
        $request = new ServiceRequest();

        return $this->handleServiceRequest($request, $service, $resource);
    }
238331
public static function getAPI($service)
    {
        $service = strtolower($service);
        $identifier = 'com:connect.oauth.service.'.$service;
        if (!AnService::has($identifier)) {
            $config = array();
            $config['consumer'] = self::getConsumer($service);
            $config['enabled'] = self::enabled($service);
            AnService::set($identifier, AnService::get($identifier, $config));
        }

        return    AnService::get($identifier);
    }
1050832
public static function enabled($service)
    {
        $service = strtolower($service);

        return get_config_value('connect.'.$service.'_enable', true) && self::getConsumer($service)->isValid();
    }
466738
public function get($service)
    {
        return $this->has($service) ? $this->container->get($service) : null;
    }
195834
protected function getService($service) {
		$service = strtolower($service);
		$services = $this->getServices();
		if (!isset($services[$service])) {
			throw new EAuthException(Yii::t('eauth', 'Undefined service name: {service}.', array('{service}' => $service)), 500);
		}
		return $services[$service];
	}
261333
public function validateServiceExist($service, $services)
    {
        if ($service == '') {
            return null;
        }

        if (!in_array($service, array_values($services))) {
            throw new \InvalidArgumentException(sprintf('Service "%s" is invalid.', $service));
        }

        return $service;
    }
1313999
public function getServiceInstance($service, $new = false)
    {
        /**
         * we check if the requested service exists
         * if is does we return a new instance of the
         * the service.
         */
        if (isset($this->services->$service)) {
            if ($new === true) {
                return clone $this->services->$service;
            } else {
                return $this->services->$service;
            }
        }
        return null;
    }
737784
public function getServiceEndpoint( $service ) {
        switch ( $service ) {
            case 'organization':
                return $this->organizationUrl;
            case 'discovery':
                return $this->discoveryUrl;
            case 'sts':
            case 'login':
                return $this->loginUrl;
            default:
                return $service;
        }
    }
827381
public function service($service,$session = null)
    {
        $this->service = (new Service($service,$session ?: $this->session));

        return $this->service;
    }
257455
protected function requireServiceJobId()
    {
        return $this->serviceName !== null && $this->serviceJobId !== null && $this->repoToken === null;
    }
1337499
public function propagate($service)
    {
        if(is_object($service) &&  ($service instanceof ServiceLocatorAwareInterface)){
            $service->setServiceLocator($this);
        }
        return $service;
    }
778475
private function init($service)
    {
        //====================================================================//
        // Debug
        Splash::log()->deb('MsgWsCall');
        //====================================================================//
        // Safety Check
        if (!$this->verify()) {
            return Splash::log()->err('ErrWsInValid');
        }
        //====================================================================//
        // Clean Data Input Buffer
        $this->cleanIn();
        //====================================================================//
        // Prepare Data Output Buffer
        //====================================================================//
        // Fill buffer with Server Core infos
        $this->outputs->server = $this->getServerInfos();
        // Remote Service to call
        $this->outputs->service = $service;
        // Share Debug Flag with Server
        $this->outputs->debug = (int) SPLASH_DEBUG;

        return true;
    }
138532
protected function getService($service)
    {
        if (!isset($this->app[$service])) {
            throw new \Exception('O serviço '.$service.' não foi registrado na aplicação!');
        }

        return $this->app[$service];
    }
537776
public function getServiceNameById($id)
    {
        $map = $this->getServiceIdNameMap();
        if (array_key_exists($id, $map)) {
            return $map[$id];
        }

        return null;
    }
307087
public function getServiceById($id)
    {
        if ($name = $this->getServiceNameById($id)) {
            return $this->getService($name);
        }

        return null;
    }