Skip to content
Browse files

rebuild .phar package; update readme; bump version

  • Loading branch information...
1 parent 54ba0c4 commit 5fdc14184c0044aecc5b9b319910d332448e8a4a @thousandsofthem thousandsofthem committed
Showing with 21 additions and 8 deletions.
  1. +4 −4 IronMQ.class.php
  2. +16 −3 README.md
  3. BIN iron_mq.phar
  4. +1 −1 simpleTest.php
View
8 IronMQ.class.php
@@ -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.2.0
+ * @version 1.3.0
* @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.2.0';
+ protected $client_version = '1.3.0';
protected $client_name = 'iron_mq_php';
protected $product_name = 'iron_mq';
protected $default_values = array(
@@ -221,7 +221,7 @@ public function clearQueue($queue_name) {
* </code>
* <code>
* $ironmq->postMessage("test_queue", "Test Message", array(
- * "timeout" => 120,
+ * 'timeout' => 120,
* 'delay' => 2,
* 'expires_in' => 2*24*3600 # 2 days
* ));
@@ -250,7 +250,7 @@ public function postMessage($queue_name, $message, $properties = array()) {
* Example:
* <code>
* $ironmq->postMessages("test_queue", array("Lorem", "Ipsum"), array(
- * "timeout" => 120,
+ * 'timeout' => 120,
* 'delay' => 2,
* 'expires_in' => 2*24*3600 # 2 days
* ));
View
19 README.md
@@ -83,14 +83,22 @@ More complex example:
```php
<?php
-$ironmq->postMessage("test_queue", array(
- "body" => "Test Message",
- "timeout" => 120, # Timeout, in seconds. After timeout, item will be placed back on queue. Defaults to 60.
+$ironmq->postMessage("test_queue", "Test Message", array(
+ 'timeout' => 120, # Timeout, in seconds. After timeout, item will be placed back on queue. Defaults to 60.
'delay' => 5, # The item will not be available on the queue until this many seconds have passed. Defaults to 0.
'expires_in' => 2*24*3600 # How long, in seconds, to keep the item on the queue before it is deleted.
));
```
+Post multiple messages in one API call:
+
+```php
+<?php
+$ironmq->postMessages("test_queue", array("Message 1", "Message 2"), array(
+ 'timeout' => 120
+));
+```
+
### **Pop** a message off the queue:
```php
<?php
@@ -117,6 +125,11 @@ There are two ways to fix this error:
1. Disable SSL sertificate verification - add this line after IronMQ initialization: `$ironmq->ssl_verifypeer = false;`
2. Switch to http protocol - add this to configuration options: `protocol = http` and `port = 80`
+# Updating notes
+
+* In version 1.3.0 changed argument list in methods `postMessage` and `postMessages`. Please revise code that uses these methods.
+
+
# Full Documentation
View
BIN iron_mq.phar
Binary file not shown.
View
2 simpleTest.php
@@ -10,7 +10,7 @@
for ($i = 0; $i < 10; $i++){
echo "Post message..\n";
- $res = $ironmq->postMessage("test_queue", array("body" => "Test Message $i"));
+ $res = $ironmq->postMessage("test_queue", "Test Message $i");
print_r($res);
echo "Get message..\n";

0 comments on commit 5fdc141

Please sign in to comment.
Something went wrong with that request. Please try again.