AMQPConnection::connect

(No version information available, might only be in SVN)

AMQPConnection::connectEstablish 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');
}


?>


Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout