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

search for in the

SAMConnection->unsubscribe> <SAMConnection::setDebug
Last updated: Fri, 13 Nov 2009

view this page in

SAMConnection->subscribe

(PECL sam >= 0.1.0)

SAMConnection->subscribe 指定したトピックの購読を作成する

説明

SAMConnection
string subscribe ( string $targetTopic )

"subscribe" メソッドを使用して、指定したトピックを購読します。

パラメータ

targetTopic

購読するトピックの識別子 (topic://topicname)。

返り値

購読の識別子を返します。これを、それ以降にデータを取得する際に トピックのデータを取得するためのセレクタとして使用します。 エラーが発生した場合には FALSE を返します。 この識別子を使用して、特定のトピック名の受信コールを行います。

例1 トピックの購読

<?php
$subid 
$conn->subscribe('topic://A');
if (!
$subid) {
  
// 購読に失敗しました!
  
echo "Subscribe failed ($conn->errno$conn->error";
}
?>



add a note add a note User Contributed Notes
SAMConnection->subscribe
There are no user contributed notes for this page.

SAMConnection->unsubscribe> <SAMConnection::setDebug
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites