@param $service

@return \yii\web\Response
481780
public function run( $service ) {

        return $this->redirectWithMessages(
            $this->synchronizer->disconnect( $service ),
            Yii::t( 'SyncSocial', 'Service was successfully disconnected' ),
            Yii::t( 'SyncSocial', 'There is error in disconnection' )
        );
    }
274046
public function addService($service)
    {
        if (in_array($service, $this->allServices)) {
            $this->services[] = $service;
        }

        return $this;
    }
172512
public function service($name)
    {
        if (isset($this->resolved[$name])) {
            return $this->resolved[$name];
        }

        $service = $this->resolver->resolve($name);
        $serviceArgs = $this->resolveFuncArgs($service);

        return $this->resolved[$name] = $service->invoke($serviceArgs);
    }
402666
public function loadDeferredProvider($service)
    {
        if (!isset($this->deferredServices[$service])) {
            return;
        }
        $provider = $this->deferredServices[$service];

        // If the service provider has not already been loaded and registered we can
        // register it with the application and remove the service from this list
        // of deferred services, since it will already be loaded on subsequent.
        if (!isset($this->registeredProviders[$provider])) {
            $this->registerDeferredProvider($provider, $service);
        }
    }
29188
protected function loadDeferredProvider($service)
	{
		$provider = $this->deferredServices[$service];

		// If the service provider has not already been loaded and registered we can
		// register it with the application and remove the service from this list
		// of deferred services, since it will already be loaded on subsequent.
		if ( ! isset($this->loadedProviders[$provider]))
		{
			$this->registerDeferredProvider($provider, $service);
		}
	}
746442
public function show($id)
    {
        $data = $this->service->show($id);

        return $this->success($data);
    }
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];
    }
228834
public function updateService(Service $service)
    {
        ValidationUtility::ensureNotNull('$service->getApiKey()', $service->getApiKey());

        return $this->callServiceOwnerPostApi(
            '\Authlete\Dto\Service::fromJson',
            self::$SERVICE_UPDATE_API_PATH . $service->getApiKey(),
            null, $service);
    }
761487
protected function createWorker($service)
    {
        return $this->getServiceBroker()
            ->service($service)
            ->context($this->command->getContext());
    }
1179038
public function resolve($service)
	{
		if (!isset($this->services[$service])) {
			throw new ResolutionException("Could not resolve service '$service'");
		}

		return new Func($this->services[$service]);
	}
1348051
public function handle($request)
    {
        $allow_ips = config('jsonrpc.servers.' . $request->service);

        // если не заданы настройки - по умолчанию запрещаем доступ
        if (null === $allow_ips) {
            throw new JsonRpcException(JsonRpcException::CODE_FORBIDDEN);
        }

        // если разрешено всем
        if ($allow_ips === '*') {
            return true;
        }

        if (!\is_array($allow_ips)) {
            throw new JsonRpcException(JsonRpcException::CODE_FORBIDDEN);
        }

        // если разрешено всем
        if (\in_array('*', $allow_ips, true)) {
            return true;
        }

        $ip = Request::ip();
        if (!\in_array($ip, $allow_ips, true)) {
            throw new JsonRpcException(JsonRpcException::CODE_FORBIDDEN);
        }

        return true;
    }
1149349
public function getService($service = null)
    {
        if ( $service and ! array_key_exists($service, $this->service) )
        {
            $this->setService($service);
        }

        $this->setToken();

        return $this->service[$service];
    }
453987
protected function build( $service ){

            $this->validateConfig( $service );

            // set default endpoint
            $this->setEndpoint();

            // set web service parameters
            $this->service = config('googlemaps.service.'.$service);

            // is service key set, use it, otherwise use default key
            $this->key = empty( $this->service['key'] )
                         ? config('googlemaps.key')
                         : $this->service['key'];

            // set service url
            $this->requestUrl = $this->service['url'];

            // is ssl_verify_peer key set, use it, otherwise use default key
            $this->verifySSL = empty(config('googlemaps.ssl_verify_peer'))
                            ? FALSE
                            :config('googlemaps.ssl_verify_peer');

            $this->clearParameters();
    }
811687
public function make($service)
    {
        $service = 'Google_Service_'.ucfirst($service);

        if (class_exists($service)) {
            $class = new \ReflectionClass($service);

            return $class->newInstance($this->client);
        }

        throw new UnknownServiceException($service);
    }
827381
public function service($service,$session = null)
    {
        $this->service = (new Service($service,$session ?: $this->session));

        return $this->service;
    }
753261
public function getServices()
	{
		$services = false;
		if (!empty($this->cache) && Yii::$app->has($this->cache)) {
			/** @var $cache \yii\caching\Cache */
			$cache = Yii::$app->get($this->cache);
			$services = $cache->get('EAuth.services');
		}

		if (false === $services || !is_array($services)) {
			$services = [];
			foreach ($this->services as $service => $options) {
				/** @var $class ServiceBase */
				$class = $this->getIdentity($service);
				$services[$service] = (object)[
					'id' => $class->getServiceName(),
					'title' => $class->getServiceTitle(),
					'type' => $class->getServiceType(),
					'jsArguments' => $class->getJsArguments(),
				];
			}
			if (isset($cache)) {
				$cache->set('EAuth.services', $services, $this->cacheExpire);
			}
		}
		return $services;
	}
451117
public static function get($service, $default = null) {
		if($service instanceof BaseService) {
			return $service;
		}
		$serviceInstance = ArrayHelper::getValue(\App::$domain, $service, $default);
		if(!is_object($serviceInstance)) {
			throw new InvalidConfigException("Service \"$service\" not found");
		}
		return $serviceInstance;
	}