class Database implements Database (View source)

Methods

void
__construct(array $servers = array())

Create a new Redis connection instance.

ClientInterface|null
connection(string $name = 'default')

Get a specific Redis connection instance.

mixed
command(string $method, array $parameters = array())

Run a command against the Redis database.

void
subscribe(array|string $channels, Closure $callback, string $connection = null, string $method = 'subscribe')

Subscribe to a set of given channels for messages.

void
psubscribe(array|string $channels, Closure $callback, string $connection = null)

Subscribe to a set of given channels with wildcards.

mixed
__call(string $method, array $parameters)

Dynamically make a Redis command.

Details

at line line 25
void __construct(array $servers = array())

Create a new Redis connection instance.

Parameters

array $servers

Return Value

void

at line line 74
ClientInterface|null connection(string $name = 'default')

Get a specific Redis connection instance.

Parameters

string $name

Return Value

ClientInterface|null

at line line 86
mixed command(string $method, array $parameters = array())

Run a command against the Redis database.

Parameters

string $method
array $parameters

Return Value

mixed

at line line 100
void subscribe(array|string $channels, Closure $callback, string $connection = null, string $method = 'subscribe')

Subscribe to a set of given channels for messages.

Parameters

array|string $channels
Closure $callback
string $connection
string $method

Return Value

void

at line line 123
void psubscribe(array|string $channels, Closure $callback, string $connection = null)

Subscribe to a set of given channels with wildcards.

Parameters

array|string $channels
Closure $callback
string $connection

Return Value

void

at line line 135
mixed __call(string $method, array $parameters)

Dynamically make a Redis command.

Parameters

string $method
array $parameters

Return Value

mixed