PHP Класс Predis\PubSub\AbstractConsumer

Автор: Daniele Alessandri ([email protected])
Наследование: implements Iterator
Показать файл Открыть проект

Открытые методы

Метод Описание
__destruct ( ) Automatically stops the consumer when the garbage collector kicks in.
current ( ) : array Returns the last message payload retrieved from the server and generated by one of the active subscriptions.
key ( )
next ( )
ping ( string $payload = null ) PING the server with an optional payload that will be echoed as a PONG message in the pub/sub loop.
psubscribe ( $pattern ) Subscribes to the specified channels using a pattern.
punsubscribe ( ) Unsubscribes from the specified channels using a pattern.
rewind ( )
stop ( boolean $drop = false ) : boolean Closes the context by unsubscribing from all the subscribed channels. The context can be forcefully closed by dropping the underlying connection.
subscribe ( $channel ) Subscribes to the specified channels.
unsubscribe ( ) Unsubscribes from the specified channels.
valid ( ) : boolean Checks if the the consumer is still in a valid state to continue.

Защищенные методы

Метод Описание
disconnect ( ) Closes the underlying connection when forcing a disconnection.
getValue ( ) : array Waits for a new message from the server generated by one of the active subscriptions and returns it when available.
invalidate ( ) Resets the state of the consumer.
isFlagSet ( integer $value ) : boolean Checks if the specified flag is valid based on the state of the consumer.
writeRequest ( string $method, array $arguments ) Writes a Redis command on the underlying connection.

Описание методов

__destruct() публичный Метод

Automatically stops the consumer when the garbage collector kicks in.
public __destruct ( )

current() публичный Метод

Returns the last message payload retrieved from the server and generated by one of the active subscriptions.
public current ( ) : array
Результат array

disconnect() абстрактный защищенный Метод

Closes the underlying connection when forcing a disconnection.
abstract protected disconnect ( )

getValue() абстрактный защищенный Метод

Waits for a new message from the server generated by one of the active subscriptions and returns it when available.
abstract protected getValue ( ) : array
Результат array

invalidate() защищенный Метод

Resets the state of the consumer.
protected invalidate ( )

isFlagSet() защищенный Метод

Checks if the specified flag is valid based on the state of the consumer.
protected isFlagSet ( integer $value ) : boolean
$value integer Flag.
Результат boolean

key() публичный Метод

public key ( )

next() публичный Метод

public next ( )

ping() публичный Метод

PING the server with an optional payload that will be echoed as a PONG message in the pub/sub loop.
public ping ( string $payload = null )
$payload string Optional PING payload.

psubscribe() публичный Метод

Subscribes to the specified channels using a pattern.
public psubscribe ( $pattern )

punsubscribe() публичный Метод

Unsubscribes from the specified channels using a pattern.
public punsubscribe ( )

rewind() публичный Метод

public rewind ( )

stop() публичный Метод

Closes the context by unsubscribing from all the subscribed channels. The context can be forcefully closed by dropping the underlying connection.
public stop ( boolean $drop = false ) : boolean
$drop boolean Indicates if the context should be closed by dropping the connection.
Результат boolean Returns false when there are no pending messages.

subscribe() публичный Метод

Subscribes to the specified channels.
public subscribe ( $channel )

unsubscribe() публичный Метод

Unsubscribes from the specified channels.
public unsubscribe ( )

valid() публичный Метод

Checks if the the consumer is still in a valid state to continue.
public valid ( ) : boolean
Результат boolean

writeRequest() абстрактный защищенный Метод

Writes a Redis command on the underlying connection.
abstract protected writeRequest ( string $method, array $arguments )
$method string Command ID.
$arguments array Arguments for the command.