/**
  * PHP5 Constructor
  *
  * @param array   $config
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->_client_id = $config['client_id'];
     $this->_refresh_token = $config['refresh_token'];
     $this->_root_folder_id = $config['root_folder_id'];
     $this->_root_url = rtrim($config['root_url'], '/') . '/';
     $this->_new_access_token_callback = $config['new_access_token_callback'];
     $this->_init_service($config['access_token']);
 }
Example #2
0
 /**
  * PHP5 Constructor
  *
  * @param array   $config
  */
 function __construct($config = array())
 {
     $config = array_merge(array('host' => '', 'type' => '', 'user' => '', 'pass' => '', 'path' => '', 'pasv' => false, 'domain' => array(), 'docroot' => ''), $config);
     $host_port = explode(':', $config['host']);
     if (sizeof($host_port) == 2) {
         $config['host'] = $host_port[0];
         $config['port'] = $host_port[1];
     }
     parent::__construct($config);
 }
 function __construct($config = array())
 {
     $config = array_merge(array('user_name' => '', 'api_key' => '', 'region' => '', 'container' => '', 'cname' => array(), 'access_state' => ''), $config);
     $this->_container = $config['container'];
     $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(), 'host_http' => '', 'host_https' => ''), $this->_access_state);
     parent::__construct($config);
     $this->_create_api(array($this, '_on_new_access_requested_api_files'), array($this, '_on_new_access_requested_api_cdn'));
 }
 /**
  * PHP5 Constructor
  *
  * @param array   $config
  */
 function __construct($config = array())
 {
     $config = array_merge(array('user' => '', 'key' => '', 'container' => '', 'cname' => array()), $config);
     parent::__construct($config);
 }
 /**
  * PHP5 Constructor
  *
  * @param array   $config
  */
 function __construct($config = array())
 {
     $config = array_merge(array('domain' => array()), $config);
     parent::__construct($config);
 }
Example #6
0
 /**
  * PHP5 Constructor
  *
  * @param array   $config
  */
 function __construct($config = array())
 {
     $config = array_merge(array('key' => '', 'secret' => '', 'bucket' => '', 'cname' => array()), $config);
     parent::__construct($config);
 }
 /**
  * PHP5 Constructor
  *
  * @param array   $config
  */
 function __construct($config = array())
 {
     $config = array_merge(array('key' => '', 'secret' => '', 'bucket' => '', 'cname' => array()), $config);
     $this->_s3 = new \S3($config['key'], $config['secret'], false, $config['api_host']);
     parent::__construct($config);
 }