Permalink
Browse files

revert chages in getmessage(s) return format; rebuild .phar package;

  • Loading branch information...
thousandsofthem committed Jan 1, 2013
1 parent 6ef5eed commit 1baedbf50dae829c558d7eddcf1b9ce959a156ce
Showing with 7 additions and 7 deletions.
  1. +7 −7 IronMQ.class.php
  2. BIN iron_mq.phar
View
@@ -6,7 +6,7 @@
* @link https://github.com/iron-io/iron_mq_php
* @link http://www.iron.io/products/mq
* @link http://dev.iron.io/
- * @version 1.3.1
+ * @version 1.3.2
* @package IronMQPHP
* @copyright Feel free to copy, steal, take credit for, or whatever you feel like doing with this code. ;)
*/
@@ -117,7 +117,7 @@ public function asArray() {
class IronMQ extends IronCore {
- protected $client_version = '1.3.1';
+ protected $client_version = '1.3.2';
protected $client_name = 'iron_mq_php';
protected $product_name = 'iron_mq';
protected $default_values = array(
@@ -230,7 +230,7 @@ public function clearQueue($queue_name) {
* @param string $queue_name Name of the queue.
* @param string $message
* @param array $properties
- * @return string id
+ * @return mixed
*/
public function postMessage($queue_name, $message, $properties = array()) {
$msg = new IronMQ_Message($message, $properties);
@@ -242,7 +242,8 @@ public function postMessage($queue_name, $message, $properties = array()) {
$url = "projects/{$this->project_id}/queues/$queue/messages";
$res = $this->apiCall(self::POST, $url, $req);
$decoded = self::json_decode($res);
- return $decoded->ids[0];
+ $decoded->id = $decoded->ids[0];
+ return $decoded;
}
/**
@@ -260,7 +261,7 @@ public function postMessage($queue_name, $message, $properties = array()) {
* @param string $queue_name Name of the queue.
* @param array $messages array of messages, each message same as for postMessage() method
* @param array $properties array of message properties, applied to each message in $messages
- * @return array $ids
+ * @return mixed
*/
public function postMessages($queue_name, $messages, $properties = array()) {
$req = array(
@@ -274,8 +275,7 @@ public function postMessages($queue_name, $messages, $properties = array()) {
$queue = rawurlencode($queue_name);
$url = "projects/{$this->project_id}/queues/$queue/messages";
$res = $this->apiCall(self::POST, $url, $req);
- $decoded = self::json_decode($res);
- return $decoded->ids;
+ return self::json_decode($res);
}
/**
View
Binary file not shown.

0 comments on commit 1baedbf

Please sign in to comment.