class RedisManager implements Factory mixin Connection

Properties

protected string $driver

The name of the default driver.

protected array $config

The Redis server configurations.

protected mixed $connections

The Redis connections.

Methods

__construct(string $driver, array $config)

Create a new Redis manager instance.

connection(string $name = null)

Get a Redis connection by name.

resolve(string|null $name = null)

Resolve the given connection by name.

resolveCluster(string $name)

Resolve the given cluster connection by name.

connector()

Get the connector instance for the current driver.

mixed
__call(string $method, array $parameters)

Pass methods onto the default Redis connection.

Details

at line 41
__construct(string $driver, array $config)

Create a new Redis manager instance.

Parameters

string $driver
array $config

at line 53
Connection connection(string $name = null)

Get a Redis connection by name.

Parameters

string $name

Return Value

Connection

at line 72
Connection resolve(string|null $name = null)

Resolve the given connection by name.

Parameters

string|null $name

Return Value

Connection

Exceptions

InvalidArgumentException

at line 97
protected Connection resolveCluster(string $name)

Resolve the given cluster connection by name.

Parameters

string $name

Return Value

Connection

at line 111
protected PhpRedisConnector|PredisConnector connector()

Get the connector instance for the current driver.

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

Pass methods onto the default Redis connection.

Parameters

string $method
array $parameters

Return Value

mixed