(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.
void
Returns true if connection was successful, false otherwise.
Beispiel #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()) {
throw new Exception('Could not connect');
}
?>