/** * 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; }
/** * 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); }
/** * 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); }
/** * Constructor * * @param string $accessKey * @param string $secretKey * @param string $region */ public function __construct($accessKey = null, $secretKey = null, $region = null) { parent::__construct($accessKey, $secretKey, $region); }
/** * 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); }