Queue-centric wrapper for Amazon Simple Queue Service
2008.11.18
2006-2008 LifeNexus Digital, Inc., and contributors.
| Simplified BSD License | http://opensource.org/licenses/bsd-license.php |
| Tarzan | http://tarzan-aws.com |
| Amazon SQS | http://aws.amazon.com/sqs |
Container for all Amazon SQS-related methods. Inherits additional methods from AmazonSQS.
AmazonSQS
require_once('tarzan.class.php');
// Instantiate a new AmazonSQS object using the settings from the config.inc.php file.
$sqs = new AmazonSQSQueue();
// Instantiate a new AmazonSQS object using these specific settings.
$sqs = new AmazonSQSQueue($key, $secret_key);
public function __construct( $queue = null, $key = null, $secret_key = null )
The constructor
public
| queue | string (Optional) The NAME for the queue to revolve around. Set as null if you plan to create a new queue, as it will be auto-set. |
| 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. |
boolean false if no valid values are set, otherwise true.
| Example Usage | http://tarzan-aws.com |
public function create_queue( $queue_name, $returnCurlHandle = null )
Identical to AmazonSQS::create_queue(). The queue URL created from this method will replace the queue URL already being used with this class.
New queue URL will NOT automatically apply when using MultiCurl for parallel requests.
public
| queue_name | See AmazonSQS::create_queue(). |
| returnCurlHandle | See AmazonSQS::create_queue(). |
TarzanHTTPResponse object
| Example Usage | http://tarzan-aws.com |
public function delete_queue( $returnCurlHandle = null )
Identical to AmazonSQS::delete_queue(), except that you don’t need to pass in a queue URL.
public
| returnCurlHandle | See AmazonSQS::delete_queue(). |
TarzanHTTPResponse object
| Example Usage | http://tarzan-aws.com |
public function get_queue_attributes( $returnCurlHandle = null )
Identical to AmazonSQS::get_queue_attributes(), except that you don’t need to pass in a queue URL.
public
| returnCurlHandle | See AmazonSQS::get_queue_attributes(). |
TarzanHTTPResponse object
| Example Usage | http://tarzan-aws.com |
public function set_queue_attributes( $opt = null )
Identical to AmazonSQS::set_queue_attributes(), except that you don’t need to pass in a queue URL.
public
| opt | See AmazonSQS::set_queue_attributes(). |
TarzanHTTPResponse object
| Example Usage | http://tarzan-aws.com |
public function send_message( $message, $returnCurlHandle = null )
Identical to AmazonSQS::send_message(), except that you don’t need to pass in a queue URL.
public
| message | See AmazonSQS::send_message(). |
| returnCurlHandle | See AmazonSQS::send_message(). |
TarzanHTTPResponse object
| Example Usage | http://tarzan-aws.com |
public function receive_message( $opt = null )
Identical to AmazonSQS::receive_message(), except that you don’t need to pass in a queue URL.
public
| opt | See AmazonSQS::receive_message(). |
TarzanHTTPResponse object
| Example Usage | http://tarzan-aws.com |
public function delete_message( $receipt_handle, $returnCurlHandle = null )
Identical to AmazonSQS::delete_message(), except that you don’t need to pass in a queue URL.
public
| receipt_handle | See AmazonSQS::delete_message(). |
| returnCurlHandle | See AmazonSQS::delete_message(). |
TarzanHTTPResponse object
| Example Usage | http://tarzan-aws.com |
public function get_queue_size()
Identical to AmazonSQS::get_queue_size(), except that you don’t need to pass in a queue URL.
public
integer The Approximate number of messages in the queue.
| Example Usage | http://tarzan-aws.com |