AMQPConnection::__construct
AMQPConnection::getHost
AMQPConnection
PHP Manual

# AMQPConnection::disconnect

(PECL amqp >= Unknown)

AMQPConnection::disconnect — Closes the connection with the AMQP broker.

### Opis

public bool AMQPConnection::disconnect ( void )

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

### Parametry

void

### Zwracane wartości

Returns true if connection was successfully closed, false otherwise.

### Przykłady

Przykład #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');
}
?>`

AMQPConnection::__construct
AMQPConnection::getHost
AMQPConnection
PHP Manual