Connection
Uses
Properties
$client Redis
The Redis client.
$name string|null
The Redis connection name.
Methods
createSubscription ( $channels , Closure $callback , $method ) : void
Subscribe to a set of given channels for messages.
Parameters
- $channels array|string
- $callback Closure
- $method string
funnel ( $name ) : ConcurrencyLimiterBuilder
Funnel a callback for a maximum number of simultaneous executions.
Parameters
- $name string
throttle ( $name ) : DurationLimiterBuilder
Throttle a callback for a maximum number of executions over a given duration.
Parameters
- $name string
client ( ) : mixed
Get the underlying Redis client.
subscribe ( $channels , Closure $callback ) : void
Subscribe to a set of given channels for messages.
Parameters
- $channels array|string
- $callback Closure
psubscribe ( $channels , Closure $callback ) : void
Subscribe to a set of given channels with wildcards.
Parameters
- $channels array|string
- $callback Closure
command ( $method , array $parameters ) : mixed
Run a command against the Redis database.
Parameters
- $method string
- $parameters array
parseParametersForEvent ( array $parameters ) : array
Parse the command's parameters for event dispatching.
Parameters
- $parameters array
event ( $event ) : void
Fire the given event if possible.
Parameters
- $event mixed
listen ( Closure $callback ) : void
Register a Redis command listener with the connection.
Parameters
- $callback Closure
getName ( ) : string|null
Get the connection name.
setName ( $name ) : $this
Set the connections name.
Parameters
- $name string
setEventDispatcher ( Dispatcher $events ) : void
Set the event dispatcher instance on the connection.
Parameters
- $events Dispatcher
unsetEventDispatcher ( ) : void
Unset the event dispatcher instance on the connection.
__call ( $method , $parameters ) : mixed
Pass other method calls down to the underlying client.
Parameters
- $method string
- $parameters array