Example #1
0
 /**
  * Constructor
  *
  * @param null $accessKey Override the default Access Key
  * @param null $secretKey Override the default Secret Key
  * @param null $region Sets the AWS Region
  * @param HttpClient $httpClient  Override the default HTTP Client
  * @throws Exception\InvalidArgumentException
  */
 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;
 }
Example #2
0
 /**
  * Create Amazon SimpleDB client.
  *
  * @param  string $accessKey Override the default Access Key
  * @param  string $secretKey Override the default Secret Key
  */
 public function __construct($accessKey, $secretKey)
 {
     parent::__construct($accessKey, $secretKey);
     $this->setEndpoint("https://" . $this->_sdbEndpoint);
 }
Example #3
0
File: S3.php Project: tillk/vufind
 /**
  * Constructor
  *
  * @param string $accessKey
  * @param string $secretKey
  * @param string $region
  */
 public function __construct($accessKey = null, $secretKey = null, HttpClient $httpClient = null)
 {
     parent::__construct($accessKey, $secretKey, $httpClient);
     $this->setEndpoint('http://' . self::S3_ENDPOINT);
 }
Example #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);
 }
Example #5
0
 /**
  * Constructor
  *
  * @param  null                               $accessKey  Override the default Access Key
  * @param  null                               $secretKey  Override the default Secret Key
  * @param  null                               $region     Sets the AWS Region
  * @param  HttpClient                         $httpClient Override the default HTTP Client
  * @throws Exception\InvalidArgumentException
  */
 public function __construct($accessKey = null, $secretKey = null, $region = null, HttpClient $httpClient = null)
 {
     parent::__construct($accessKey, $secretKey, $httpClient);
     $this->setRegion($region ?: self::$_defaultRegion);
 }