Пример #1
0
 public function testNoKeysThrowException()
 {
     Amazon\AbstractAmazon::setKeys(null, null);
     // to make sure there's NO DEFAULTS
     $this->setExpectedException('Zend\\Service\\Amazon\\Exception\\InvalidArgumentException', 'AWS keys were not supplied');
     $class = new TestAmazonAbstract();
 }
Пример #2
0
 /**
  * Create Amazon client.
  *
  * @param  string $access_key       Override the default Access Key
  * @param  string $secret_key       Override the default Secret Key
  * @param  string $region           Sets the AWS Region
  * @return void
  */
 public function __construct($accessKey = null, $secretKey = null, $region = null, HttpClient $httpClient = null)
 {
     parent::__construct($accessKey, $secretKey, $httpClient);
     if (!$region) {
         $region = self::$_defaultRegion;
     } else {
         // make rue the region is valid
         if (!empty($region) && !in_array(strtolower($region), self::$_validEc2Regions, true)) {
             throw new Exception\InvalidArgumentException('Invalid Amazon Ec2 Region');
         }
     }
     $this->_region = $region;
 }
Пример #3
0
Файл: Sqs.php Проект: rikaix/zf2
 /**
  * Constructor
  *
  * @param string $accessKey
  * @param string $secretKey
  * @param string $region
  */
 public function __construct($accessKey = null, $secretKey = null, $region = null)
 {
     parent::__construct($accessKey, $secretKey, $region);
 }
Пример #4
0
 /**
  * Constructor
  *
  * @param string $accessKey
  * @param string $secretKey
  * @param string $region
  */
 public function __construct($accessKey = null, $secretKey = null, $region = null)
 {
     parent::__construct($accessKey, $secretKey, $region);
     $this->setEndpoint('http://' . self::S3_ENDPOINT);
 }
Пример #5
0
 /**
  * Create Amazon SimpleDB client.
  *
  * @param  string $access_key       Override the default Access Key
  * @param  string $secret_key       Override the default Secret Key
  * @param  string $region           Sets the AWS Region
  * @return void
  */
 public function __construct($accessKey, $secretKey)
 {
     parent::__construct($accessKey, $secretKey);
     $this->setEndpoint("https://" . $this->_sdbEndpoint);
 }