AMQPConnection::connect
(No version information available, might only be in SVN)
AMQPConnection::connect — Establish a connection with the AMQP broker.
Description
public boolean AMQPConnection::connect
( void
)
This method will initiate a connection with the AMQP broker.
Parameters
void
Return Values
Returns true if connection was successful, false otherwise.
Examples
Example #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');
}
?>