PHP 클래스 Horde_PubSub, horde

파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_topics Subscribed topics and their handles

공개 메소드들

메소드 설명
clearHandles ( string $topic ) : void Clear all handlers for a given topic
getSubscribedHandles ( string $topic ) : array Retrieve all handlers for a given topic
getTopics ( ) : array Retrieve all registered topics
publish ( string $topic, mixed $args = null ) : void Publish to all handlers for a given topic
subscribe ( string $topic, string | object $context, null | string $handler = null ) : Horde_PubSub_Handle Subscribe to a topic
unsubscribe ( Horde_PubSub_Handle $handle ) : boolean Unsubscribe a handler from a topic

메소드 상세

clearHandles() 공개 정적인 메소드

Clear all handlers for a given topic
public static clearHandles ( string $topic ) : void
$topic string
리턴 void

getSubscribedHandles() 공개 정적인 메소드

Retrieve all handlers for a given topic
public static getSubscribedHandles ( string $topic ) : array
$topic string
리턴 array Array of Horde_PubSub_Handle objects

getTopics() 공개 정적인 메소드

Retrieve all registered topics
public static getTopics ( ) : array
리턴 array

publish() 공개 정적인 메소드

Publish to all handlers for a given topic
public static publish ( string $topic, mixed $args = null ) : void
$topic string
$args mixed All arguments besides the topic are passed as arguments to the handler
리턴 void

subscribe() 공개 정적인 메소드

Subscribe to a topic
public static subscribe ( string $topic, string | object $context, null | string $handler = null ) : Horde_PubSub_Handle
$topic string
$context string | object Function name, class name, or object instance
$handler null | string If $context is a class or object, the name of the method to call
리턴 Horde_PubSub_Handle Pub-Sub handle (to allow later unsubscribe)

unsubscribe() 공개 정적인 메소드

Unsubscribe a handler from a topic
public static unsubscribe ( Horde_PubSub_Handle $handle ) : boolean
$handle Horde_PubSub_Handle
리턴 boolean Returns true if topic and handle found, and unsubscribed; returns false if either topic or handle not found

프로퍼티 상세

$_topics 보호되어 있는 정적으로 프로퍼티

Subscribed topics and their handles
protected static $_topics