class Illuminate / Redis / Connections / Connection
You are viewing an older version of the documentation. For the latest, please visit master documentation.
abstract

Connection

Uses

Properties

protected

$client Redis

The Redis client.

Default: null
protected

$name string|null

The Redis connection name.

Default: null
protected

$events Dispatcher

The event dispatcher instance.

Default: null

Methods

public abstract

createSubscription ( $channels , Closure $callback , $method ) : void

Subscribe to a set of given channels for messages.

Parameters

  • $channels array|string
  • $callback Closure
  • $method string
public

funnel ( $name ) : ConcurrencyLimiterBuilder

Funnel a callback for a maximum number of simultaneous executions.

Parameters

  • $name string
public

throttle ( $name ) : DurationLimiterBuilder

Throttle a callback for a maximum number of executions over a given duration.

Parameters

  • $name string
public

client ( ) : mixed

Get the underlying Redis client.

public

subscribe ( $channels , Closure $callback ) : void

Subscribe to a set of given channels for messages.

Parameters

  • $channels array|string
  • $callback Closure
public

psubscribe ( $channels , Closure $callback ) : void

Subscribe to a set of given channels with wildcards.

Parameters

  • $channels array|string
  • $callback Closure
public

command ( $method , array $parameters ) : mixed

Run a command against the Redis database.

Parameters

  • $method string
  • $parameters array
protected

event ( $event ) : void

Fire the given event if possible.

Parameters

  • $event mixed
public

listen ( Closure $callback ) : void

Register a Redis command listener with the connection.

Parameters

public

getName ( ) : string|null

Get the connection name.

public

setName ( $name ) : $this

Set the connections name.

Parameters

  • $name string
public

getEventDispatcher ( ) : Dispatcher

Get the event dispatcher used by the connection.

public

setEventDispatcher ( Dispatcher $events ) : void

Set the event dispatcher instance on the connection.

Parameters

public

unsetEventDispatcher ( ) : void

Unset the event dispatcher instance on the connection.

public

__call ( $method , $parameters ) : mixed

Pass other method calls down to the underlying client.

Parameters

  • $method string
  • $parameters array