Public Member Functions |
| | __construct ($accessKey=null, $secretKey=null, $region=null) |
| | create ($queue_name, $timeout=null) |
| | delete ($queue_url) |
| | getQueues () |
| | count ($queue_url) |
| | send ($queue_url, $message) |
| | receive ($queue_url, $max_messages=null, $timeout=null) |
| | deleteMessage ($queue_url, $handle) |
| | getAttribute ($queue_url, $attribute= 'All') |
Data Fields |
| const | CREATE_TIMEOUT_DEFAULT = 30 |
Protected Member Functions |
| | addRequiredParameters ($queue_url, array $parameters) |
| | _signParameters ($queue_url, array $paramaters) |
Protected Attributes |
| | $_sqsEndpoint = 'queue.amazonaws.com' |
| | $_sqsApiVersion = '2009-02-01' |
| | $_sqsSignatureVersion = '2' |
| | $_sqsSignatureMethod = 'HmacSHA256' |
Detailed Description
Definition at line 43 of file Sqs.php.
Constructor & Destructor Documentation
| __construct |
( |
$ |
accessKey = null, |
|
|
$ |
secretKey = null, |
|
|
$ |
region = null |
|
) |
| |
Constructor
- Parameters:
-
| string | $accessKey | |
| string | $secretKey | |
| string | $region | |
Definition at line 77 of file Sqs.php.
Member Function Documentation
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:
-
| string | $queue_url | Queue URL |
| array | $parameters | the parameters for which to get the signature. |
- Returns:
- string the signed data.
Definition at line 418 of file Sqs.php.
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:
-
| string | $queue_url | Queue URL |
| array | $parameters | the array to which to add the required parameters. |
- Returns:
- array
Definition at line 386 of file Sqs.php.
Return the approximate number of messages in the queue
- Parameters:
-
| string | $queue_url | Queue URL |
- Returns:
- integer
- Exceptions:
-
Definition at line 180 of file Sqs.php.
| create |
( |
$ |
queue_name, |
|
|
$ |
timeout = null |
|
) |
| |
Create a new queue
Visibility timeout is how long a message is left in the queue "invisible" to other readers. If the message is acknowleged (deleted) before the timeout, then the message is deleted. However, if the timeout expires then the message will be made available to other queue readers.
- Parameters:
-
| string | $queue_name | queue name |
| integer | $timeout | default visibility timeout |
- Returns:
- string|boolean
- Exceptions:
-
Definition at line 95 of file Sqs.php.
Delete a queue and all of it's messages
Returns false if the queue is not found, true if the queue exists
- Parameters:
-
| string | $queue_url | queue URL |
- Returns:
- boolean
- Exceptions:
-
Definition at line 138 of file Sqs.php.
Delete a message from the queue
Returns true if the message is deleted, false if the deletion is unsuccessful.
- Parameters:
-
| string | $queue_url | Queue URL |
| string | $handle | Message handle as returned by SQS |
- Returns:
- boolean
- Exceptions:
-
Definition at line 267 of file Sqs.php.
Get the attributes for the queue
- Parameters:
-
| string | $queue_url | Queue URL |
| string | $attribute | |
- Returns:
- string
- Exceptions:
-
Definition at line 290 of file Sqs.php.
Get an array of all available queues
- Returns:
- array
- Exceptions:
-
Definition at line 156 of file Sqs.php.
| receive |
( |
$ |
queue_url, |
|
|
$ |
max_messages = null, |
|
|
$ |
timeout = null |
|
) |
| |
Get messages in the queue
- Parameters:
-
| string | $queue_url | Queue name |
| integer | $max_messages | Maximum number of messages to return |
| integer | $timeout | Visibility timeout for these messages |
- Returns:
- array
- Exceptions:
-
Definition at line 222 of file Sqs.php.
| send |
( |
$ |
queue_url, |
|
|
$ |
message |
|
) |
| |
Send a message to the queue
- Parameters:
-
| string | $queue_url | Queue URL |
| string | $message | Message to send to the queue |
- Returns:
- string Message ID
- Exceptions:
-
Definition at line 193 of file Sqs.php.
Field Documentation
$_sqsApiVersion = '2009-02-01' [protected] |
The API version to use
Definition at line 58 of file Sqs.php.
$_sqsEndpoint = 'queue.amazonaws.com' [protected] |
HTTP end point for the Amazon SQS service
Definition at line 53 of file Sqs.php.
$_sqsSignatureMethod = 'HmacSHA256' [protected] |
Signature Encoding Method
Definition at line 68 of file Sqs.php.
$_sqsSignatureVersion = '2' [protected] |
Default timeout for createQueue() function
Definition at line 48 of file Sqs.php.
The documentation for this class was generated from the following file:
- C:/xampp/htdocs/moodle/lib/zend/Zend/Service/Amazon/Sqs.php