(PECL amqp >= Unknown)

AMQPConnection::isConnectedDetermine if the AMQPConnection object is connected to the broker.


public bool AMQPConnection::isConnected ( void )

This method will check whether the connection to the AMQP broker is still valid. It does so by checking the return status of the last command.


Esta função não possui parâmetros.

Valor Retornado

Returns true if connected, false otherwise


Exemplo #1 AMQPConnection::isConnected() example


/* Create a new connection */
$conn = new AMQPConnection();

/* Check that connection is working */
if ($conn->isConnected()) {
"Connected to the broker \o/";
else {
"Cannot connect to the broker";


add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top