@param bool $privileged

@return Client
543821
public function setPrivileged(bool $privileged)
    {
        $this->privileged = $privileged;

        $this->hostConfig = array_merge($this->hostConfig, ['Privileged' => $privileged]);

        return $this;
    }
1041040
public function getOAuthClient($client_id, $client_secret, $redirect_uri)
    {
        $options = [
            'clientId' => $client_id,
            'clientSecret' => $client_secret,
            'redirectUri' => $redirect_uri
        ];
        $OAuthClient = new OAuth($options);

        return $OAuthClient;
    }
1241851
protected function getClient()
	{
		$this->client->timeout       = $this->timeout;
		$this->client->sslVerifyPeer = $this->sslVerifyPeer;

		return $this->client;
	}
308282
protected function createClient(array $opts=[])
  {
    if ( !$this->guzzleClient ) {
      $this->guzzleClient = new \GuzzleHttp\Client();
      $this->cookieJar = new \GuzzleHttp\Cookie\CookieJar();
    }

    return $this->guzzleClient;
  }
475889
protected function getHttpClient(bool $force = false): HttpClient
    {
        if ($this->_httpClient === null || $force) {
            $config = ArrayHelper::merge(['class' => HttpClient::class], $this->httpClientConfig);
            $config['baseUrl'] = $this->getBaseUrl();

            return $this->_httpClient = Yii::createObject($config);
        } else {
            return $this->_httpClient;
        }
    }
172386
public function revokeAllAuthority($authorization, $client_id) {
        $instance = new revokeAllAuthority($this, $this->getUserAgent(), $authorization, $client_id);
        return $instance;
    }
122701
public function checkAuthorization($authorization, $client_id, $access_token) {
        $instance = new checkAuthorization($this, $this->getUserAgent(), $authorization, $client_id, $access_token);
        return $instance;
    }
794148
public function checkAcl($privilege)
    {
        // Find the base resource name this module is given.
        $moduleName = substr(get_class($this), 0, strpos(get_class($this), '\\'));
        $config     = $this->getServiceLocator()->get('Config');
        $baseName   = $config['jaztec_acl']['name'][$moduleName];
        $allowed    = $this->getAclService()->isAllowed($this->getRole(), $this->aclDenominator, $privilege, $baseName);

        return $allowed;
    }
1037846
private function createClient(
        string $host,
        int $httpPort,
        int $udpPort,
        string $user,
        string $password,
        bool $udp = false,
        bool $ssl = false,
        bool $sslVerify = false,
        float $timeout = 0.0,
        float $connectTimeout = 0.0
    ): Client {
        $client = new Client($host, $httpPort, $user, $password, $ssl, $sslVerify, $timeout, $connectTimeout);

        if ($udp) {
            $client->setDriver(new UDP($client->getHost(), $udpPort));
        }

        return $client;
    }
1099776
protected function createClient( $resource, $related = null )
	{
		$context = $this->getContext( 'client/jsonapi/templates' );
		return \Aimeos\Client\JsonApi::create( $context, $resource . '/' . $related );
	}
1012069
public function client($id)
    {
        if (isset($this->clients[$id])) {
            return $this->clients[$id];
        }

        return new Client($this, $id);
    }
1136604
public function isAllowed($resource, $privilege = null)
    {
        $this->loaded && $this->loaded->__invoke();

        try {
            return $this->acl->isAllowed($this->getIdentity(), $resource, $privilege);
        } catch (InvalidArgumentException $e) {
            return false;
        }
    }
739200
function getClient($clientName)
    {
        if (! isset($this->clients[$clientName]) )
            // if not client constructed look for lazy options:
            $this->clients[$clientName] = $this->_attainClient($clientName);


        return $this->clients[$clientName];
    }
240744
private static function injectGrant(AclAuthorization $acl, $grantType, array $ruleSet)
    {
        // Add new resource to ACL
        $resource = $ruleSet['resource'];
        $acl->addResource($ruleSet['resource']);

        // Deny guest specified privileges to resource
        $privileges = isset($ruleSet['privileges']) ? $ruleSet['privileges'] : null;

        // null privileges means no permissions were setup; nothing to do
        if (null === $privileges) {
            return;
        }

        $acl->$grantType('guest', $resource, $privileges);
    }
721575
protected function getClient(): HttpClient
    {
        if ($this->client === null) {
            $this->client = new HttpClient($this->getClientConfig());
        }

        return $this->client;
    }
858811
public function oauthClientClass($instance = false)
	{
		if (! isset($this->oauth_client_class)) {
			throw new \InvalidArgumentException(static::class . ' does not implement an OAuth Client class definition.');
		}

		return $instance ? new  $this->oauth_client_class : $this->oauth_client_class;
	}
932010
protected function client()
    {
        $dsn = $this->config('dsn');
        if (!$dsn) {
            return null;
        }

        $client = new Raven_Client($dsn);
        $callInstall = $this->config('callInstall');
        if ($callInstall === true) {
            $client->install();
        }

        return $client;
    }