From 7cdcbb776a9c996ab3f62c391412a2dcca83c85e Mon Sep 17 00:00:00 2001 From: Brad Rodriguez Date: Sat, 18 Dec 2010 17:07:41 +0000 Subject: [PATCH] updating function examples to include new required connect() method git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@306437 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/amqp/amqpexchange/declare.xml | 1 + reference/amqp/amqpexchange/delete.xml | 1 + reference/amqp/amqpqueue/consume.xml | 13 +++++++------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/reference/amqp/amqpexchange/declare.xml b/reference/amqp/amqpexchange/declare.xml index 82d6373c24..c9b40f6b6e 100644 --- a/reference/amqp/amqpexchange/declare.xml +++ b/reference/amqp/amqpexchange/declare.xml @@ -76,6 +76,7 @@ /* Create a new connection */ $cnn = new AMQPConnection(); +$cnn->connect(); $ex = new AMQPExchange($cnn); $ex->declare('new_topic_exchange', AMQP_DURABLE | AMQP_AUTODELETE); diff --git a/reference/amqp/amqpexchange/delete.xml b/reference/amqp/amqpexchange/delete.xml index 23f12bdcee..a3ed2e5921 100644 --- a/reference/amqp/amqpexchange/delete.xml +++ b/reference/amqp/amqpexchange/delete.xml @@ -57,6 +57,7 @@ /* Create a new connection */ $cnn = new AMQPConnection(); +$cnn->connect(); /* Create a new exchange */ $ex = new AMQPExchange($cnn); diff --git a/reference/amqp/amqpqueue/consume.xml b/reference/amqp/amqpqueue/consume.xml index ea379df556..e7a3d376e1 100644 --- a/reference/amqp/amqpqueue/consume.xml +++ b/reference/amqp/amqpqueue/consume.xml @@ -29,9 +29,9 @@ options - options is a an array of consume options. The keys used in the options array are: min, max, and ack. All other keys will be ignored. + options is a an array of consume options. The keys used in the options array are: min, max, and ack. All other keys will be ignored. - + For each missing option, the extension will check the ini settings or use the default value. @@ -43,7 +43,7 @@ &reftitle.returnvalues; - An array contained a the messages consumed. The number of returned messages will be at least the number given by min in the options array. But not more than the number given by max. + An array contained a the messages consumed. The number of returned messages will be at least the number given by min in the options array. But not more than the number given by max. @@ -58,6 +58,7 @@ /* Create a connection using all default credentials: */ $connection = new AMQPConnection(); +$connection->connect(); /* create a queue object */ $queue = new AMQPQueue($connection); @@ -66,9 +67,9 @@ $queue = new AMQPQueue($connection); $queue->declare('myqueue'); $options = array( - 'min' => 1, - 'max' => 10, - 'ack' => true + 'min' => 1, + 'max' => 10, + 'ack' => true ); //get the messages