コード例 #1
0
 /**
  * Constructor
  *
  * The default region is us-east-1. Use the region to set it to one of the regions that is build-in into ZF.
  * To add a new AWS region use the setEndpoint() method.
  *
  * @param string $accessKey
  * @param string $secretKey
  * @param string $region
  */
 public function __construct($accessKey = null, $secretKey = null, $region = null)
 {
     parent::__construct($accessKey, $secretKey, $region);
     if (null !== $region) {
         $this->_setEndpoint($region);
     }
 }
コード例 #2
0
 /**
  * Create Amazon SES client.
  *
  * @param  string        $access_key         (Optional) Override the default Access Key
  * @param  string        $secret_key         (Optional) Override the default Secret Key
  * @param  Zend_Uri_Http $endpoint  Endpoint (Optional) Endpoint Url
  * @return void
  */
 public function __construct($accessKey = null, $secretKey = null, Zend_Uri_Http $endpoint = null)
 {
     parent::__construct($accessKey, $secretKey);
     if (!is_null($endpoint)) {
         $this->setEndpoint($endpoint);
     }
 }
コード例 #3
0
ファイル: Ses.php プロジェクト: grrr-amsterdam/garp3
 /**
  * Create Amazon client.
  *
  * @param  string $access_key       Override the default Access Key
  * @param  string $secret_key       Override the default Secret Key
  * @param  string $region           Override the default Region
  * @return void
  */
 public function __construct($accessKey = null, $secretKey = null, $region = null)
 {
     $ini = Zend_Registry::get('config');
     if (!$accessKey || !$secretKey) {
         if (!$accessKey && isset($ini->amazon->ses->accessKey)) {
             $accessKey = $ini->amazon->ses->accessKey;
         }
         if (!$secretKey && isset($ini->amazon->ses->secretKey)) {
             $secretKey = $ini->amazon->ses->secretKey;
         }
     }
     if (!$region) {
         $region = isset($ini->amazon->ses->region) ? $ini->amazon->ses->region : self::DEFAULT_REGION;
     }
     $this->setRegion($region);
     parent::__construct($accessKey, $secretKey);
 }
コード例 #4
0
ファイル: Sqs.php プロジェクト: fredcido/simuweb
 /**
  * Constructor
  *
  * @param string $accessKey
  * @param string $secretKey
  * @param string $region
  */
 public function __construct($accessKey = null, $secretKey = null, $region = null)
 {
     parent::__construct($accessKey, $secretKey, $region);
 }
コード例 #5
0
ファイル: Abstract.php プロジェクト: fredcido/cenbrap
 /**
  * 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)
 {
     if (!$region) {
         $region = self::$_defaultRegion;
     } else {
         // make rue the region is valid
         if (!empty($region) && !in_array(strtolower($region), self::$_validEc2Regions, true)) {
             require_once 'Zend/Service/Amazon/Exception.php';
             throw new Zend_Service_Amazon_Exception('Invalid Amazon Ec2 Region');
         }
     }
     $this->_region = $region;
     parent::__construct($accessKey, $secretKey);
 }
コード例 #6
0
ファイル: S3.php プロジェクト: hirentricore/devmagento
 /**
  * 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);
 }
コード例 #7
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);
 }
コード例 #8
0
 /**
  * Set the keys to use when accessing SQS.
  *
  * @param  string $access_key       Set the default Access Key
  * @param  string $secret_key       Set the default Secret Key
  * @return void
  */
 public static function setKeys($accessKey, $secretKey)
 {
     self::$_defaultAccessKey = $accessKey;
     self::$_defaultSecretKey = $secretKey;
 }
コード例 #9
0
ファイル: Abstract.php プロジェクト: c12g/stratos-php
 /**
  * Set which region you are working in.  It will append the
  * end point automaticly
  *
  * @param string $region
  */
 public static function setRegion($region)
 {
     if (in_array(strtolower($region), self::$_validEc2Regions, true)) {
         self::$_defaultRegion = $region;
     } else {
         require_once 'Zend/Service/Amazon/Exception.php';
         throw new Zend_Service_Amazon_Exception('Invalid Amazon Ec2 Region');
     }
 }