public function AkamaiClientBase::createClientConfig in Akamai 8.3
Creates a config array for consumption by Akamai\Open\EdgeGrid\Client.
Parameters
\Drupal\akamai\AkamaiAuthentication $auth: The auth instance.
Return value
array The config array.
See also
Akamai\Open\EdgeGrid\Client::setBasicOptions
1 call to AkamaiClientBase::createClientConfig()
- AkamaiClientBase::__construct in src/
AkamaiClientBase.php - AkamaiClient constructor.
File
- src/
AkamaiClientBase.php, line 174
Class
- AkamaiClientBase
- Connects to the Akamai EdgeGrid.
Namespace
Drupal\akamaiCode
public function createClientConfig(AkamaiAuthentication $auth = NULL) {
$client_config = [];
$client_config['base_uri'] = $this->configFactory
->get('akamai.settings')
->get('rest_api_url');
if ($auth && $this->configFactory
->get('akamai.settings')
->get('storage_method') == 'file') {
$client_config['base_uri'] = $auth
->getHost();
}
$client_config['timeout'] = $this->configFactory
->get('akamai.settings')
->get('timeout');
return $client_config;
}