Skip to content
This repository was archived by the owner on Jul 22, 2021. It is now read-only.

Commit a444083

Browse files
committed
1 parent 74b7e4a commit a444083

File tree

6 files changed

+67
-26
lines changed

6 files changed

+67
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AWS SDK for PHP
22

3-
> This is the repository for AWS SDK for PHP 1.x. For **AWS SDK for PHP 2.x**, see <http://github.com/aws/aws-sdk-php>.
3+
> This is the repository for version 1 of the AWS SDK for PHP. For the new **AWS SDK for PHP 2**, see <http://github.com/aws/aws-sdk-php>.
44
55
The AWS SDK for PHP enables developers to build solutions for Amazon Simple Storage Service (Amazon S3),
66
Amazon Elastic Compute Cloud (Amazon EC2), Amazon SimpleDB, and more. With the AWS SDK for PHP, developers

_docs/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Changelog: 1.5.16 "Rhapsody"
2+
The pre-cursor to Mac OS X, built from technology acquired from NeXT. <http://en.wikipedia.org/wiki/Rhapsody_(operating_system)>
3+
4+
Launched Thursday, November 08, 2012.
5+
6+
## Services
7+
### AmazonSQS
8+
* **New:** Support for Long Polling in SQS has been added to the SDK.
9+
10+
----
11+
112
# Changelog: 1.5.15 "Quixote"
213
"Rocinante" (Don Quixote's horse) was the code name for the PowerMac Upgrade enabler. <http://applemuseum.bott.org/sections/codenames.html>
314

extensions/dynamodbsessionhandler.class.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public function read($id)
289289
$node_name = 'Item';
290290
}
291291

292-
if ($response->isOK())
292+
if ($response && $response->isOK())
293293
{
294294
$item = array();
295295

@@ -502,13 +502,17 @@ protected function _lock_and_read($id)
502502
{
503503
return $response;
504504
}
505-
else
505+
elseif (stripos((string) $response->body->asXML(), 'ConditionalCheckFailedException') !== false)
506506
{
507507
usleep(rand($this->_min_lock_retry_utime, $this->_max_lock_retry_utime));
508508

509509
$now = time();
510510
}
511+
else
512+
{
513+
return null;
514+
}
511515
}
512-
while(true);
516+
while (true);
513517
}
514518
}

package.xml

Lines changed: 26 additions & 13 deletions
Large diffs are not rendered by default.

sdk.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ function __aws_sdk_ua_callback()
115115
// INTERMEDIARY CONSTANTS
116116

117117
define('CFRUNTIME_NAME', 'aws-sdk-php');
118-
define('CFRUNTIME_VERSION', '1.5.15');
119-
define('CFRUNTIME_BUILD', '20120926163000');
118+
define('CFRUNTIME_VERSION', '1.5.16');
119+
define('CFRUNTIME_BUILD', '20121109104359');
120120
define('CFRUNTIME_USERAGENT', CFRUNTIME_NAME . '/' . CFRUNTIME_VERSION . ' PHP/' . PHP_VERSION . ' ' . str_replace(' ', '_', php_uname('s')) . '/' . str_replace(' ', '_', php_uname('r')) . ' Arch/' . php_uname('m') . ' SAPI/' . php_sapi_name() . ' Integer/' . PHP_INT_MAX . ' Build/' . CFRUNTIME_BUILD . __aws_sdk_ua_callback());
121121

122122

services/sqs.class.php

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* Visit <a href="http://aws.amazon.com/sqs/">http://aws.amazon.com/sqs/</a> for more information.
3232
*
33-
* @version 2012.01.29
33+
* @version 2012.10.04
3434
* @license See the included NOTICE.md file for complete information.
3535
* @copyright See the included NOTICE.md file for complete information.
3636
* @link http://aws.amazon.com/sqs/ Amazon Simple Queue Service
@@ -134,7 +134,7 @@ class AmazonSQS extends CFRuntime
134134
*/
135135
public function __construct(array $options = array())
136136
{
137-
$this->api_version = '2011-10-01';
137+
$this->api_version = '2012-09-15';
138138
$this->hostname = self::DEFAULT_URL;
139139
$this->auth_class = 'AuthV2Query';
140140

@@ -398,7 +398,7 @@ public function change_message_visibility_batch($queue_url, $change_message_visi
398398
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
399399
* <li><code>Attribute</code> - <code>array</code> - Optional - A map of attributes with their corresponding values. <ul>
400400
* <li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
401-
* <li><code>Name</code> - <code>string</code> - Optional - The name of a queue attribute. [Allowed values: <code>Policy</code>, <code>VisibilityTimeout</code>, <code>MaximumMessageSize</code>, <code>MessageRetentionPeriod</code>, <code>ApproximateNumberOfMessages</code>, <code>ApproximateNumberOfMessagesNotVisible</code>, <code>CreatedTimestamp</code>, <code>LastModifiedTimestamp</code>, <code>QueueArn</code>, <code>ApproximateNumberOfMessagesDelayed</code>, <code>DelaySeconds</code>]</li>
401+
* <li><code>Name</code> - <code>string</code> - Optional - The name of a queue attribute. [Allowed values: <code>Policy</code>, <code>VisibilityTimeout</code>, <code>MaximumMessageSize</code>, <code>MessageRetentionPeriod</code>, <code>ApproximateNumberOfMessages</code>, <code>ApproximateNumberOfMessagesNotVisible</code>, <code>CreatedTimestamp</code>, <code>LastModifiedTimestamp</code>, <code>QueueArn</code>, <code>ApproximateNumberOfMessagesDelayed</code>, <code>DelaySeconds</code>, <code>ReceiveMessageWaitTimeSeconds</code>]</li>
402402
* <li><code>Value</code> - <code>string</code> - Optional - The value of a queue attribute.</li>
403403
* </ul></li>
404404
* </ul></li>
@@ -522,6 +522,8 @@ public function delete_queue($queue_url, $opt = null)
522522
* <li><code>ApproximateNumberOfMessagesDelayed</code> - returns the approximate number of
523523
* messages that are pending to be added to the queue.</li>
524524
* <li><code>DelaySeconds</code> - returns the default delay on the queue in seconds.</li>
525+
* <li><code>ReceiveMessageWaitTimeSeconds</code> - returns the time for which a ReceiveMessage
526+
* call will wait for a message to arrive.</li>
525527
* </ul>
526528
*
527529
* @param string $queue_url (Required) The URL of the SQS queue to take action on.
@@ -589,12 +591,22 @@ public function list_queues($opt = null)
589591
* returned on subsequent <code>ReceiveMessage</code> requests for the duration of the
590592
* <code>VisibilityTimeout</code>. If you do not specify a <code>VisibilityTimeout</code> in the
591593
* request, the overall visibility timeout for the queue is used for the returned messages.
594+
*
595+
* If a message is available in the queue, the call will return immediately. Otherwise, it will
596+
* wait up to <code>WaitTimeSeconds</code> for a message to arrive. If you do not specify
597+
* <code>WaitTimeSeconds</code> in the request, the queue attribute ReceiveMessageWaitTimeSeconds
598+
* is used to determine how long to wait.
599+
*
600+
* You could ask for additional information about each message through the attributes. Attributes
601+
* that can be requested are <code>[SenderId, ApproximateFirstReceiveTimestamp,
602+
* ApproximateReceiveCount, SentTimestamp]</code>.
592603
*
593604
* @param string $queue_url (Required) The URL of the SQS queue to take action on.
594605
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
595-
* <li><code>AttributeName</code> - <code>string|array</code> - Optional - A list of attributes to retrieve information for. Pass a string for a single value, or an indexed array for multiple values.</li>
606+
* <li><code>AttributeName</code> - <code>string|array</code> - Optional - A list of attributes that need to be returned along with each message. The set of valid attributes are [SenderId, ApproximateFirstReceiveTimestamp, ApproximateReceiveCount, SentTimestamp]. Pass a string for a single value, or an indexed array for multiple values.</li>
596607
* <li><code>MaxNumberOfMessages</code> - <code>integer</code> - Optional - The maximum number of messages to return. Amazon SQS never returns more messages than this value but may return fewer. All of the messages are not necessarily returned.</li>
597608
* <li><code>VisibilityTimeout</code> - <code>integer</code> - Optional - The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a <code>ReceiveMessage</code> request.</li>
609+
* <li><code>WaitTimeSeconds</code> - <code>integer</code> - Optional - The duration (in seconds) for which the call will wait for a message to arrive in the queue before returning. If a message is available, the call will return sooner than WaitTimeSeconds.</li>
598610
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
599611
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
600612
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
@@ -689,13 +701,14 @@ public function send_message_batch($queue_url, $send_message_batch_request_entry
689701
}
690702

691703
/**
692-
* Sets an attribute of a queue. The set of attributes that can be set are - DelaySeconds,
693-
* MessageRetentionPeriod, MaximumMessageSize, VisibilityTimeout and Policy.
704+
* Sets the value of one or more queue attributes. Valid attributes that can be set are
705+
* [VisibilityTimeout, Policy, MaximumMessageSize, MessageRetentionPeriod,
706+
* ReceiveMessageWaitTimeSeconds].
694707
*
695708
* @param string $queue_url (Required) The URL of the SQS queue to take action on.
696709
* @param array $attribute (Required) A map of attributes to set. <ul>
697710
* <li><code>x</code> - <code>array</code> - Optional - This represents a simple array index. <ul>
698-
* <li><code>Name</code> - <code>string</code> - Optional - The name of a queue attribute. [Allowed values: <code>Policy</code>, <code>VisibilityTimeout</code>, <code>MaximumMessageSize</code>, <code>MessageRetentionPeriod</code>, <code>ApproximateNumberOfMessages</code>, <code>ApproximateNumberOfMessagesNotVisible</code>, <code>CreatedTimestamp</code>, <code>LastModifiedTimestamp</code>, <code>QueueArn</code>, <code>ApproximateNumberOfMessagesDelayed</code>, <code>DelaySeconds</code>]</li>
711+
* <li><code>Name</code> - <code>string</code> - Optional - The name of a queue attribute. [Allowed values: <code>Policy</code>, <code>VisibilityTimeout</code>, <code>MaximumMessageSize</code>, <code>MessageRetentionPeriod</code>, <code>ApproximateNumberOfMessages</code>, <code>ApproximateNumberOfMessagesNotVisible</code>, <code>CreatedTimestamp</code>, <code>LastModifiedTimestamp</code>, <code>QueueArn</code>, <code>ApproximateNumberOfMessagesDelayed</code>, <code>DelaySeconds</code>, <code>ReceiveMessageWaitTimeSeconds</code>]</li>
699712
* <li><code>Value</code> - <code>string</code> - Optional - The value of a queue attribute.</li>
700713
* </ul></li>
701714
* </ul>

0 commit comments

Comments
 (0)