Example #1
0
 /**
  * QnsClient 构造方法
  *
  * @param array $config The client configuration
  */
 function __construct(array $config)
 {
     parent::__construct($config, 'qns');
     $this->signer = new BceV1Signer();
     $this->httpClient = new BceHttpClient();
     $this->prefix .= $config['account'];
 }
Example #2
0
 /**
  * @param array $config The client configuration to connect VOD Server
  * @param array $bosConfig The client configuration to connect BOS server
  */
 function __construct(array $config, $bosConfig = array())
 {
     parent::__construct($config, 'VodClient', false);
     $this->signer = new BceV1Signer();
     $this->httpClient = new BceHttpClient();
     if (count($bosConfig) == 0) {
         $bosConfig = $config;
         if (isset($bosConfig[BceClientConfigOptions::ENDPOINT])) {
             unset($bosConfig[BceClientConfigOptions::ENDPOINT]);
         }
     }
     $bosConfig[BceClientConfigOptions::REGION] = 'bj';
     $this->bosClient = new BosClient($bosConfig);
 }
Example #3
0
 /**
  * The BosClient constructor
  *
  * @param array $config The client configuration
  */
 function __construct(array $config)
 {
     parent::__construct($config, 'bos');
     $this->signer = new BceV1Signer();
     $this->httpClient = new BceHttpClient();
 }
Example #4
0
 /**
  * The BosClient constructor
  *
  * @param array $config The client configuration
  */
 function __construct(array $config)
 {
     parent::__construct($config, 'bos');
     $this->auth = new Auth(new BceCredentials($config['credentials']));
 }