AMQPConnection::disconnect

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

AMQPConnection::disconnectCloses the connection with the AMQP broker.

Description

public boolean AMQPConnection::disconnect ( void )

This method will close an open connection with the AMQP broker.

Parameters

void

Return Values

Returns true if connection was successfully closed, false otherwise.

Examples

Example #1 AMQPConnection::disconnect() 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');
}

// do something interesting

if (!$cnn->disconnect()) {
 throw new 
Exception('Could not disconnect');
}


?>


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