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

search for in the

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

view this page in

AMQPConnection::disconnect

(PECL amqp >= Unknown)

AMQPConnection::disconnectAMQP ブローカとの接続を閉じる

説明

public bool AMQPConnection::disconnect ( void )

このメソッドは、AMQP ブローカとの間で開いた接続を閉じます。

パラメータ

void

返り値

接続を閉じられた場合に true、それ以外の場合に false を返します。

例1 AMQPConnection::disconnect() の例

<?php

/* 新しい接続を作成します */
$cnn = new AMQPConnection();

// ログインの詳細を設定します
$cnn->setLogin('mylogin');
$cnn->setPassword('mypass');

if (!
$cnn->connect()) {
    throw new 
Exception('接続できません');
}

// 何かをします

if (!$cnn->disconnect()) {
    throw new 
Exception('切断できません');
}

?>



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

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