SAMConnection::unsubscribe()

(no version information, might be only in CVS)

SAMConnection::unsubscribe() --  Cancel a subscription to one or more topics.

Description

The "unsubscribe" method is used to delete an existing subscription to one or more topics.

class SAMConnection {

bool unsubscribe ( string subscriptionId [, string targetTopic] )

}

Warning: This method is not currently implemented.

Parameters

subscriptionId

The identifier of an existing subscription as returned by a call to the subscribe method.

targetTopic

An optional topic identifier of the topic for which the subscription is to be cancelled. If this value is not specified the subscription will be cancelled for all topics currently subscribed to.

Return Values

This method returns FALSE if an error occurs.

Examples

Example 1. Unsubscribe from a single topic

<?php
if (!$conn->unsubscribe($subid, 'topic://A')) {
  
// The unsubscribe failed!
  
echo "Unsubscribe failed ($conn->errno) $conn->error";
}
?>