(No version information available, might only be in SVN)
AMQPConnection::connect — Establish a connection with the AMQP broker.
This method will initiate a connection with the AMQP broker.
У этой функции нет параметров.
Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.
Пример #1 AMQPConnection::connect() example
<?php
/* Create a new connection */
$cnn = new AMQPConnection();
// set the login details
$cnn->setLogin('mylogin');
$cnn->setPassword('mypass');
if ($cnn->connect()) {
echo "Established a connection to the broker";
}
else {
echo "Cannot connect to the broker";
}
?>