downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

AMQPConnection::__construct> <AMQPConnection
[edit] Last updated: Fri, 17 May 2013

view this page in

AMQPConnection::connect

(PECL amqp >= Unknown)

AMQPConnection::connectEstablish a connection with the AMQP broker.

Descrizione

public bool AMQPConnection::connect ( void )

This method will initiate a connection with the AMQP broker.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Restituisce TRUE in caso di successo, FALSE in caso di fallimento.

Esempi

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()) {
    echo 
"Established a connection to the broker";
}
else {
    echo 
"Cannot connect to the broker";
}


?>



add a note add a note User Contributed Notes AMQPConnection::connect - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites