mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Updating examples to be in line with new API
Fixing typo git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@306826 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
9b5add9631
commit
953e9ec5b2
1 changed files with 3 additions and 3 deletions
|
@ -18,8 +18,8 @@ $ex = new AMQPExchange($cnn);
|
|||
$ex->declare('exchange1', AMQP_EX_TYPE_FANOUT);
|
||||
|
||||
// Create a new queue
|
||||
$q = new AMQPQueue($cnn, 'queue1');
|
||||
$q->declare();
|
||||
$q = new AMQPQueue($cnn);
|
||||
$q->declare('queue1');
|
||||
|
||||
// Bind it on the exchange to routing.key
|
||||
$ex->bind('queue1', 'routing.key');
|
||||
|
@ -28,7 +28,7 @@ $ex->bind('queue1', 'routing.key');
|
|||
$ex->publish('message', 'routing.key');
|
||||
|
||||
// Read from the queue
|
||||
$msg = $queue->consume(1);
|
||||
$msg = $q->consume();
|
||||
|
||||
?>
|
||||
]]>
|
||||
|
|
Loading…
Reference in a new issue