1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
--TEST--
AMQPQueue var_dump
--SKIPIF--
<?php
if (!extension_loaded("amqp") || version_compare(PHP_VERSION, '5.3', '<')) {
print "skip";
}
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->connect();
$ch = new AMQPChannel($cnn);
// Declare a new exchange
$ex = new AMQPExchange($ch);
$ex->setName('exchange1');
$ex->setType(AMQP_EX_TYPE_FANOUT);
$ex->declareExchange();
// Create a new queue
$q = new AMQPQueue($ch);
$q->setName('queue_var_dump');
$q->declareQueue();
var_dump($q);
?>
--EXPECT--
object(AMQPQueue)#4 (9) {
["connection":"AMQPQueue":private]=>
object(AMQPConnection)#1 (11) {
["login":"AMQPConnection":private]=>
string(5) "guest"
["password":"AMQPConnection":private]=>
string(5) "guest"
["host":"AMQPConnection":private]=>
string(9) "localhost"
["vhost":"AMQPConnection":private]=>
string(1) "/"
["port":"AMQPConnection":private]=>
int(5672)
["read_timeout":"AMQPConnection":private]=>
float(0)
["write_timeout":"AMQPConnection":private]=>
float(0)
["connect_timeout":"AMQPConnection":private]=>
float(0)
["channel_max":"AMQPConnection":private]=>
int(256)
["frame_max":"AMQPConnection":private]=>
int(131072)
["heartbeat":"AMQPConnection":private]=>
int(0)
}
["channel":"AMQPQueue":private]=>
object(AMQPChannel)#2 (3) {
["connection":"AMQPChannel":private]=>
object(AMQPConnection)#1 (11) {
["login":"AMQPConnection":private]=>
string(5) "guest"
["password":"AMQPConnection":private]=>
string(5) "guest"
["host":"AMQPConnection":private]=>
string(9) "localhost"
["vhost":"AMQPConnection":private]=>
string(1) "/"
["port":"AMQPConnection":private]=>
int(5672)
["read_timeout":"AMQPConnection":private]=>
float(0)
["write_timeout":"AMQPConnection":private]=>
float(0)
["connect_timeout":"AMQPConnection":private]=>
float(0)
["channel_max":"AMQPConnection":private]=>
int(256)
["frame_max":"AMQPConnection":private]=>
int(131072)
["heartbeat":"AMQPConnection":private]=>
int(0)
}
["prefetch_count":"AMQPChannel":private]=>
int(3)
["prefetch_size":"AMQPChannel":private]=>
int(0)
}
["name":"AMQPQueue":private]=>
string(14) "queue_var_dump"
["consumer_tag":"AMQPQueue":private]=>
NULL
["passive":"AMQPQueue":private]=>
bool(false)
["durable":"AMQPQueue":private]=>
bool(false)
["exclusive":"AMQPQueue":private]=>
bool(false)
["auto_delete":"AMQPQueue":private]=>
bool(true)
["arguments":"AMQPQueue":private]=>
array(0) {
}
}
|