function __construct($config = array())
 {
     $config = array_merge(array('user_name' => '', 'api_key' => '', 'region' => '', 'service_id' => '', 'service_access_url' => '', 'service_protocol' => 'http', 'domains' => array(), 'access_state' => '', 'new_access_state_callback' => ''), $config);
     $this->_service_id = $config['service_id'];
     $this->_new_access_state_callback = $config['new_access_state_callback'];
     // init access state
     $this->_access_state = @json_decode($config['access_state'], true);
     if (!is_array($this->_access_state)) {
         $this->_access_state = array();
     }
     $this->_access_state = array_merge(array('access_token' => '', 'access_region_descriptor' => array()), $this->_access_state);
     // cnames
     if ($config['service_protocol'] != 'https' && !empty($config['domains'])) {
         $this->_domains = (array) $config['domains'];
     } else {
         $this->_domains = array($config['service_access_url']);
     }
     // form 'ssl' parameter based on service protocol
     if ($config['service_protocol'] == 'https') {
         $config['ssl'] = 'enabled';
     } else {
         $config['ssl'] = 'disabled';
     }
     parent::__construct($config);
     $this->_create_api(array($this, '_on_new_access_requested_api'));
 }
 /**
  * PHP5 Constructor
  *
  * @param array   $config
  */
 function __construct($config = array())
 {
     $config = array_merge(array('authorization_key' => '', 'alias' => '', 'consumerkey' => '', 'consumersecret' => '', 'zone_id' => 0), $config);
     $split_keys = explode('+', $config['authorization_key']);
     if (sizeof($split_keys) == 3) {
         list($config['alias'], $config['consumerkey'], $config['consumersecret']) = $split_keys;
     }
     parent::__construct($config);
 }
 /**
  * PHP5 Constructor
  *
  * @param array   $config
  * account_hash
  * username
  * password
  * host_hash_code
  */
 function __construct($config = array())
 {
     $this->api = new Cdn_Highwinds_Api($config['account_hash'], $config['api_token']);
     $this->host_hash_code = $config['host_hash_code'];
     if (!empty($config['domains'])) {
         $this->domains = (array) $config['domains'];
     } else {
         $this->domains = array('cds.' . $config['host_hash_code'] . '.hwcdn.net');
     }
     parent::__construct($config);
 }
 /**
  * PHP5 Constructor
  *
  * @param array   $config
  */
 function __construct($config = array())
 {
     $config = array_merge(array('username' => '', 'password' => '', 'zone' => '', 'action' => 'invalidate', 'email_notification' => array()), $config);
     parent::__construct($config);
 }
 /**
  * PHP5 Constructor
  *
  * @param array   $config
  */
 function __construct($config = array())
 {
     $config = array_merge(array('apiid' => '', 'apikey' => ''), $config);
     parent::__construct($config);
 }
 /**
  * PHP5 Constructor
  *
  * @param array   $config
  */
 function __construct($config = array())
 {
     $config = array_merge(array('username' => '', 'password' => '', 'zones' => array()), $config);
     parent::__construct($config);
 }