PHP 클래스 Predis\PubSub\DispatcherLoop

저자: Daniele Alessandri ([email protected])
파일 보기 프로젝트 열기: nrk/predis 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$callbacks
$defaultCallback
$subscriptionCallback

공개 메소드들

메소드 설명
__construct ( Consumer $pubsub )
attachCallback ( string $channel, callable $callback ) Binds a callback to a channel.
defaultCallback ( mixed $callable = null ) Sets a callback that gets invoked when a message is received on a channel that does not have an associated callback.
detachCallback ( string $channel ) Stops listening to a channel and removes the associated callback.
getPubSubConsumer ( ) : Consumer Returns the underlying PUB / SUB context.
run ( ) Starts the dispatcher loop.
stop ( ) Terminates the dispatcher loop.
subscriptionCallback ( mixed $callable = null ) Sets a callback that gets invoked upon new subscriptions.

보호된 메소드들

메소드 설명
assertCallback ( mixed $callable ) Checks if the passed argument is a valid callback.
getPrefixKeys ( ) : string Return the prefix used for keys.

메소드 상세

__construct() 공개 메소드

public __construct ( Consumer $pubsub )
$pubsub Consumer PubSub consumer instance used by the loop.

assertCallback() 보호된 메소드

Checks if the passed argument is a valid callback.
protected assertCallback ( mixed $callable )
$callable mixed A callback.

attachCallback() 공개 메소드

Binds a callback to a channel.
public attachCallback ( string $channel, callable $callback )
$channel string Channel name.
$callback callable A callback.

defaultCallback() 공개 메소드

Sets a callback that gets invoked when a message is received on a channel that does not have an associated callback.
public defaultCallback ( mixed $callable = null )
$callable mixed A callback.

detachCallback() 공개 메소드

Stops listening to a channel and removes the associated callback.
public detachCallback ( string $channel )
$channel string Redis channel.

getPrefixKeys() 보호된 메소드

Return the prefix used for keys.
protected getPrefixKeys ( ) : string
리턴 string

getPubSubConsumer() 공개 메소드

Returns the underlying PUB / SUB context.
public getPubSubConsumer ( ) : Consumer
리턴 Consumer

run() 공개 메소드

Starts the dispatcher loop.
public run ( )

stop() 공개 메소드

Terminates the dispatcher loop.
public stop ( )

subscriptionCallback() 공개 메소드

Sets a callback that gets invoked upon new subscriptions.
public subscriptionCallback ( mixed $callable = null )
$callable mixed A callback.

프로퍼티 상세

$callbacks 보호되어 있는 프로퍼티

protected $callbacks

$defaultCallback 보호되어 있는 프로퍼티

protected $defaultCallback

$subscriptionCallback 보호되어 있는 프로퍼티

protected $subscriptionCallback