@param string $service

@return bool
7847
public function hasAccessToken(string $service):bool{
		return isset($_SESSION[$this->sessionVar], $_SESSION[$this->sessionVar][$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);
    }
628333
public function getId($service): ?string
    {
        if ($this->serviceContainer === $service) {
            return 'service_container';
        }

        if (null === $id = ($this->getServiceId)($service)) {
            return null;
        }

        if ($this->serviceContainer->has($id) || $this->reversibleLocator->has($id)) {
            return $id;
        }

        return null;
    }
1018287
private function status($service) {
        $rtn = $this->sendCommand('status', ['service' => $service]);
        if ($rtn) {
            $status = $this->getStatus($rtn['status']);
            if ($service) {
                if (isset($rtn['detail']) && $rtn['detail']) {
                    foreach ($rtn['detail'] as $item => $v) {
                        $this->output($this->cell($item, 20), false);
                        if ($item == 'pids') {
                            $this->output(implode(',', array_keys($v)));
                        } else if ($item == 'status') {
                            $this->output($this->getStatus($v));
                        } else if ($item == 'env') {
                            $this->output($this->cell([['key', 20], ['value', 6]]));
                            foreach ($v as $vk => $vv) {
                                $this->output($this->cell([['', 20], [$vk, 20]]) . $vv);
                            }
                        } else if (is_array($v)) {
                            $this->output(json_encode($v));
                        } else {
                            $this->output($v);
                        }
                    }
                } else {
                    $this->output($service . ' is ' . $status);
                }
            } else {
                $services = $rtn['services'];
                $this->output($this->cell([
                    ['Service', 20],
                    ['Type', 16],
                    ['Worker', 10],
                    ['Status', 20],
                    ['Message', 44]
                ]));
                $this->output($this->cell('-', 80, '-'));
                foreach ($services as $id => $ser) {
                    $this->output($this->cell([
                        [$id, 20],
                        [$ser['type'], 16],
                        [isset($ser['worker']) ? $ser['worker'] : 1, 10],
                        [$this->getStatus($ser['status']), 20],
                        [isset($ser['msg']) ? $ser['msg'] : '', 44]
                    ]));
                }
            }
        } else {
            $this->error('Cannot read status data');
        }
    }
644355
private function getService(string $service)
    {
        if ($this->container instanceof ContainerInterface && $this->container->has($service)) {
            return $this->container->get($service);
        }

        return new $service();
    }
1202715
protected function urlService($service)
	{
		if($service instanceof Uri)
		{
			$uri = $service->get();
		}
		else
		{
			$uri = $service;
		}
		return $this->baseUrl .'/'. ltrim($uri, '/');
	}
379849
public function has($id)
    {
        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }
        if (isset($this->services[$id])) {
            return true;
        }
        if ('service_container' === $id) {
            return true;
        }

        return isset($this->fileMap[$id]) || isset($this->methodMap[$id]);
    }
1059974
public function admin_remove_service_confirmation($service) {
        global $CFG;
        $optionsyes = array('id' => $service->id, 'action' => 'delete',
            'confirm' => 1, 'sesskey' => sesskey());
        $optionsno = array('section' => 'externalservices');
        $formcontinue = new single_button(new moodle_url('service.php', $optionsyes),
                        get_string('delete'), 'post');
        $formcancel = new single_button(
                        new moodle_url($CFG->wwwroot . "/" . $CFG->admin . "/settings.php", $optionsno),
                        get_string('cancel'), 'get');
        return $this->output->confirm(get_string('deleteserviceconfirm', 'webservice', $service->name),
                $formcontinue, $formcancel);
    }
947207
public function hasService($serviceId) {

	    return !empty($this->config->services) && array_key_exists($serviceId, $this->config->services);

    }
748671
protected function isTokenExpired( $service ) {
        if ( !$this->isTokenLoaded( $service ) ) {
            $this->tokens[$service] = $this->getToken( $service );
        }

        return $this->tokens[$service]->hasExpired();
    }
100247
protected function validate(string $service)
    {
        throw_unless(Arr::exists(config('shield.services'), $service), UnknownServiceException::class, sprintf('Service [%s] not found.', $service));
        throw_unless(Arr::exists(config('shield.services.' . $service), 'driver'), UnknownServiceException::class, sprintf('Service [%s] must have a driver.', $service));

        $service = app(config('shield.services.' . $service . '.driver'));

        throw_unless($service instanceof Service, UnsupportedDriverException::class, sprintf('Driver [%s] must implement [%s].', get_class($service), Service::class));

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

        $this->setToken();

        return $this->service[$service];
    }
1099536
protected function registerService($name, $service)
    {
        $name = strtolower($name);

        if (!isset($this->services->$name)) {
            $this->services->$name = $service;
            return true;
        }
        return false;
    }
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' )
        );
    }
1371159
public function services(string $service): array
    {
        if (empty($this->services[$service])) {
            $this->services = $this->all();
        }

        if (! empty($this->services[$service])) {
            return $this->services[$service];
        }

        throw new RangeException("The service[{$service}] not found");
    }
274046
public function addService($service)
    {
        if (in_array($service, $this->allServices)) {
            $this->services[] = $service;
        }

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