mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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
This commit is contained in:
parent
1468ebeca9
commit
7cdcbb776a
3 changed files with 9 additions and 6 deletions
|
@ -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);
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
|
||||
/* Create a new connection */
|
||||
$cnn = new AMQPConnection();
|
||||
$cnn->connect();
|
||||
|
||||
/* Create a new exchange */
|
||||
$ex = new AMQPExchange($cnn);
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
<term><parameter>options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>options</parameter> is a an array of consume options. The keys used in the <parameter>options</parameter> array are: min, max, and ack. All other keys will be ignored.
|
||||
<parameter>options</parameter> is a an array of consume options. The keys used in the <parameter>options</parameter> array are: min, max, and ack. All other keys will be ignored.
|
||||
</para>
|
||||
<para>
|
||||
<para>
|
||||
For each missing option, the extension will check the ini settings or use the default value.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -43,7 +43,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
An array contained a the messages consumed. The number of returned messages will be at least the number given by <parameter>min</parameter> in the <parameter>options</parameter> array. But not more than the number given by <parameter>max</parameter>.
|
||||
An array contained a the messages consumed. The number of returned messages will be at least the number given by <parameter>min</parameter> in the <parameter>options</parameter> array. But not more than the number given by <parameter>max</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue