You are here

function AkamaiCacheControlClient::__construct in Akamai 8

Same name and namespace in other branches
  1. 8.2 akamai.class.inc \AkamaiCacheControlClient::__construct()
  2. 6.2 akamai.class.inc \AkamaiCacheControlClient::__construct()
  3. 7.3 akamai.class.inc \AkamaiCacheControlClient::__construct()
  4. 7 akamai.class.inc \AkamaiCacheControlClient::__construct()
  5. 7.2 akamai.class.inc \AkamaiCacheControlClient::__construct()

Constructs an instance of the Akamai Cache Control facade.

Valid parameters are specified in the options array as key/value pairs with the parameter name being the key and the parameter setting being the value

Parameters

options An array of parameter options for the Akamae Cache Control: Web Service. These will override the defaults.

File

./akamai.class.inc, line 40
akamai.class.inc Akamai is a registered trademark of Akamai Technologies, Inc. This class is an abstraction around the Akamai Cache Control API.

Class

AkamaiCacheControlClient
Default implementation of the AkamaiCacheControl interface

Code

function __construct($options = array()) {
  $akamai_config = \Drupal::config('akamai.settings');
  $this->defaults = array(
    'basepath' => $akamai_config
      ->get("basepath"),
    'name' => $akamai_config
      ->get("username"),
    'pwd' => $akamai_config
      ->get("password"),
    'action' => $akamai_config
      ->get("action"),
    'type' => "arl",
    'domain' => $akamai_config
      ->get("domain"),
    'soap_wsdl' => $akamai_config
      ->get("wsdl"),
    'restapi' => $akamai_config
      ->get("restapi"),
    'email' => $akamai_config
      ->get("email"),
    'restapi_default' => $akamai_config
      ->get("restapi_default", ""),
  );
  $this->parameters = array_merge($this->defaults, $options);
}