Property | Type | Description | |
---|---|---|---|
$callbacks | |||
$defaultCallback | |||
$subscriptionCallback |
Method | Description | |
---|---|---|
__construct ( |
||
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 ( ) : |
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. |
Method | Description | |
---|---|---|
assertCallback ( mixed $callable ) | Checks if the passed argument is a valid callback. | |
getPrefixKeys ( ) : string | Return the prefix used for keys. |
public __construct ( |
||
$pubsub | PubSub consumer instance used by the loop. |
protected assertCallback ( mixed $callable ) | ||
$callable | mixed | A callback. |
public attachCallback ( string $channel, callable $callback ) | ||
$channel | string | Channel name. |
$callback | callable | A callback. |
public defaultCallback ( mixed $callable = null ) | ||
$callable | mixed | A callback. |
public detachCallback ( string $channel ) | ||
$channel | string | Redis channel. |
protected getPrefixKeys ( ) : string | ||
return | string |
public getPubSubConsumer ( ) : |
||
return |
public subscriptionCallback ( mixed $callable = null ) | ||
$callable | mixed | A callback. |