class Database (View source)

Properties

protected array $clients The host address of the database.

Methods

void
__construct(array $servers = array())

Create a new Redis connection instance.

array
createAggregateClient(array $servers)

Create a new aggregate client supporting sharding.

array
createSingleClients(array $servers)

Create an array of single connection clients.

ClientInterface
connection(string $name = 'default')

Get a specific Redis connection instance.

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

Run a command against the Redis database.

mixed
__call(string $method, array $parameters)

Dynamically make a Redis command.

Details

void __construct(array $servers = array())

Create a new Redis connection instance.

Parameters

array $servers

Return Value

void

protected array createAggregateClient(array $servers)

Create a new aggregate client supporting sharding.

Parameters

array $servers

Return Value

array

protected array createSingleClients(array $servers)

Create an array of single connection clients.

Parameters

array $servers

Return Value

array

ClientInterface connection(string $name = 'default')

Get a specific Redis connection instance.

Parameters

string $name

Return Value

ClientInterface

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

Run a command against the Redis database.

Parameters

string $method
array $parameters

Return Value

mixed

mixed __call(string $method, array $parameters)

Dynamically make a Redis command.

Parameters

string $method
array $parameters

Return Value

mixed