Пример #1
0
 public function __construct($url, $secret, $options = array())
 {
     $this->testDir = __DIR__;
     if (is_array($secret)) {
         return parent::__construct($url, $secret, $options);
     } else {
         return parent::__construct($url, array('username' => 'X', 'password' => 'Y'), $options);
     }
 }
Пример #2
0
 /**
  * @param array $secret
  * @param array $options
  */
 public function __construct(array $secret, array $options = [])
 {
     if (!isset($secret['region']) || !$secret['region']) {
         $secret['region'] = self::REGION_US;
     }
     if (!isset($secret['identity_endpoint']) || !$secret['identity_endpoint']) {
         $secret['identity_endpoint'] = self::IDENTITY_ENDPOINT;
     }
     $identityEndpoint = $secret['identity_endpoint'];
     unset($secret['identity_endpoint']);
     parent::__construct($identityEndpoint, $secret, $options);
 }
Пример #3
0
 public function __construct($url, array $secret, $region, array $options = array())
 {
     parent::__construct($url, $secret, $options);
     $this->region = $region;
 }