Moodle  2.2.1
http://www.collinsharper.com
Zend_Service_Amazon_Ec2_Abstract Class Reference
Inheritance diagram for Zend_Service_Amazon_Ec2_Abstract:
Collaboration diagram for Zend_Service_Amazon_Ec2_Abstract:

Public Member Functions

 __construct ($accessKey=null, $secretKey=null, $region=null)

Static Public Member Functions

static setRegion ($region)

Protected Member Functions

 _getRegion ()
 sendRequest (array $params=array())
 addRequiredParameters (array $parameters)
 signParameters (array $paramaters)

Protected Attributes

 $_ec2Endpoint = 'ec2.amazonaws.com'
 $_ec2ApiVersion = '2009-04-04'
 $_ec2SignatureVersion = '2'
 $_ec2SignatureMethod = 'HmacSHA256'
 $_httpTimeout = 10
 $_region

Static Protected Attributes

static $_defaultRegion = null
static $_validEc2Regions = array('eu-west-1', 'us-east-1')

Detailed Description

Definition at line 47 of file Abstract.php.


Constructor & Destructor Documentation

__construct ( accessKey = null,
secretKey = null,
region = null 
)

Create Amazon client.

Parameters:
string$access_keyOverride the default Access Key
string$secret_keyOverride the default Secret Key
string$regionSets the AWS Region
Returns:
void

Definition at line 99 of file Abstract.php.


Member Function Documentation

_getRegion ( ) [protected]

Method to fetch the AWS Region

Returns:
string

Definition at line 137 of file Abstract.php.

Here is the caller graph for this function:

addRequiredParameters ( array parameters) [protected]

Adds required authentication and version parameters to an array of parameters

The required parameters are:

  • AWSAccessKey
  • SignatureVersion
  • Timestamp
  • Version and
  • Signature

If a required parameter is already set in the $parameters array, it is overwritten.

Parameters:
array$parametersthe array to which to add the required parameters.
Returns:
array

Definition at line 200 of file Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:

sendRequest ( array params = array()) [protected]

Sends a HTTP request to the queue service using Zend_Http_Client

Parameters:
array$paramsList of parameters to send with the request
Returns:
Zend_Service_Amazon_Ec2_Response
Exceptions:
Zend_Service_Amazon_Ec2_Exception

Definition at line 149 of file Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static setRegion ( region) [static]

Set which region you are working in. It will append the end point automaticly

Parameters:
string$region

Definition at line 122 of file Abstract.php.

signParameters ( array paramaters) [protected]

Computes the RFC 2104-compliant HMAC signature for request parameters

This implements the Amazon Web Services signature, as per the following specification:

1. Sort all request parameters (including SignatureVersion and excluding Signature, the value of which is being created), ignoring case.

2. Iterate over the sorted list and append the parameter name (in its original case) and then its value. Do not URL-encode the parameter values before constructing this string. Do not use any separator characters when appending strings.

Parameters:
array$parametersthe parameters for which to get the signature.
string$secretKeythe secret key to use to sign the parameters.
Returns:
string the signed data.

Definition at line 232 of file Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$_defaultRegion = null [static, protected]

Definition at line 77 of file Abstract.php.

$_ec2ApiVersion = '2009-04-04' [protected]

The API version to use

Reimplemented in Zend_Service_Amazon_Ec2_CloudWatch.

Definition at line 57 of file Abstract.php.

$_ec2Endpoint = 'ec2.amazonaws.com' [protected]

The HTTP query server

Reimplemented in Zend_Service_Amazon_Ec2_CloudWatch.

Definition at line 52 of file Abstract.php.

$_ec2SignatureMethod = 'HmacSHA256' [protected]

Signature Encoding Method

Definition at line 67 of file Abstract.php.

$_ec2SignatureVersion = '2' [protected]

Signature Version

Definition at line 62 of file Abstract.php.

$_httpTimeout = 10 [protected]

Period after which HTTP request will timeout in seconds

Definition at line 72 of file Abstract.php.

$_region [protected]

Definition at line 82 of file Abstract.php.

$_validEc2Regions = array('eu-west-1', 'us-east-1') [static, protected]

Definition at line 89 of file Abstract.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations