Example #1
0
 /**
  * Method: __construct()
  * 	The constructor
  *
  * Access:
  * 	public
  *
  * Parameters:
  * 	key - _string_ (Optional) Your Amazon API Key. If blank, it will look for the <AWS_KEY> constant.
  * 	secret_key - _string_ (Optional) Your Amazon API Secret Key. If blank, it will look for the <AWS_SECRET_KEY> constant.
  *
  * Returns:
  * 	_boolean_ false if no valid values are set, otherwise true.
  */
 public function __construct($key = null, $secret_key = null)
 {
     $this->api_version = '2009-04-15';
     $this->hostname = SDB_DEFAULT_URL;
     if (!$key && !defined('AWS_KEY')) {
         throw new SDB_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
     }
     if (!$secret_key && !defined('AWS_SECRET_KEY')) {
         throw new SDB_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
     }
     return parent::__construct($key, $secret_key);
 }
Example #2
0
 /**
  * Method: __construct()
  * 	The constructor
  *
  * Access:
  * 	public
  *
  * Parameters:
  * 	key - _string_ (Optional) Your Amazon API Key. If blank, it will look for the <AWS_KEY> constant.
  * 	secret_key - _string_ (Optional) Your Amazon API Secret Key. If blank, it will look for the <AWS_SECRET_KEY> constant.
  *
  * Returns:
  * 	_boolean_ false if no valid values are set, otherwise true.
  */
 public function __construct($key = null, $secret_key = null)
 {
     $this->api_version = '2009-04-02';
     $this->hostname = CDN_DEFAULT_URL;
     $this->base_xml = '<?xml version="1.0" encoding="UTF-8"?><DistributionConfig xmlns="http://cloudfront.amazonaws.com/doc/' . $this->api_version . '/"></DistributionConfig>';
     if (!$key && !defined('AWS_KEY')) {
         throw new CloudFront_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
     }
     if (!$secret_key && !defined('AWS_SECRET_KEY')) {
         throw new CloudFront_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
     }
     return parent::__construct($key, $secret_key);
 }
Example #3
0
 /**
  * Method: __construct()
  * 	The constructor
  *
  * Access:
  * 	public
  *
  * Parameters:
  * 	key - _string_ (Optional) Your Amazon API Key. If blank, it will look for the <AWS_KEY> constant.
  * 	secret_key - _string_ (Optional) Your Amazon API Secret Key. If blank, it will look for the <AWS_SECRET_KEY> constant.
  * 	assoc_id - _string_ (Optional) Your Amazon Associates ID. If blank, it will look for the <AWS_ASSOC_ID> constant.
  *
  * Returns:
  * 	_boolean_ false if no valid values are set, otherwise true.
  */
 public function __construct($key = null, $secret_key = null, $assoc_id = null)
 {
     $this->api_version = '2009-07-01';
     if (!$key && !defined('AWS_KEY')) {
         throw new PAS_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
     }
     if (!$secret_key && !defined('AWS_SECRET_KEY')) {
         throw new PAS_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
     }
     if (!$assoc_id && !defined('AWS_ASSOC_ID')) {
         throw new PAS_Exception('No Amazon Associates ID was passed into the constructor, nor was it set in the AWS_ASSOC_ID constant.');
     }
     return parent::__construct($key, $secret_key, null, $assoc_id);
 }
Example #4
0
 /**
  * Method: __construct()
  * 	The constructor
  *
  * Access:
  * 	public
  *
  * Parameters:
  * 	key - _string_ (Optional) Your Amazon API Key. If blank, it will look for the <AWS_KEY> constant.
  * 	secret_key - _string_ (Optional) Your Amazon API Secret Key. If blank, it will look for the <AWS_SECRET_KEY> constant.
  *
  * Returns:
  * 	_boolean_ false if no valid values are set, otherwise true.
  */
 public function __construct($key = null, $secret_key = null)
 {
     $this->vhost = null;
     $this->api_version = '2006-03-01';
     $this->hostname = S3_DEFAULT_URL;
     $this->base_acp_xml = '<?xml version="1.0" encoding="UTF-8"?><AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/latest/"></AccessControlPolicy>';
     $this->base_logging_xml = '<?xml version="1.0" encoding="utf-8"?><BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/' . $this->api_version . '"></BucketLoggingStatus>';
     if (!$key && !defined('AWS_KEY')) {
         throw new S3_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
     }
     if (!$secret_key && !defined('AWS_SECRET_KEY')) {
         throw new S3_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
     }
     return parent::__construct($key, $secret_key);
 }
Example #5
0
 /**
  * Method: __construct()
  * 	The constructor
  *
  * Access:
  * 	public
  *
  * Parameters:
  * 	key - _string_ (Optional) Your Amazon API Key. If blank, it will look for the <AWS_KEY> constant.
  * 	secret_key - _string_ (Optional) Your Amazon API Secret Key. If blank, it will look for the <AWS_SECRET_KEY> constant.
  * 	account_id - _string_ (Optional) Your Amazon Account ID, without hyphens. If blank, it will look for the <AWS_ACCOUNT_ID> constant.
  *
  * Returns:
  * 	_boolean_ false if no valid values are set, otherwise true.
  *
  * See Also:
  * 	Example Usage - http://getcloudfusion.com/docs/examples/ec2/__construct.phps
  */
 public function __construct($key = null, $secret_key = null, $account_id = null)
 {
     $this->api_version = '2008-12-01';
     $this->hostname = EC2_DEFAULT_URL;
     if (!$key && !defined('AWS_KEY')) {
         throw new EC2_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
     }
     if (!$secret_key && !defined('AWS_SECRET_KEY')) {
         throw new EC2_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
     }
     if (!$account_id && !defined('AWS_ACCOUNT_ID')) {
         throw new EC2_Exception('No Amazon account ID was passed into the constructor, nor was it set in the AWS_ACCOUNT_ID constant.');
     }
     return parent::__construct($key, $secret_key, $account_id);
 }