class PhpRedisConnector implements Connector (View source)

Methods

connect(array $config, array $options)

Create a new clustered PhpRedis connection.

connectToCluster(array $config, array $clusterOptions, array $options)

Create a new clustered PhpRedis connection.

string
buildClusterConnectionString(array $server)

Build a single cluster seed string from array.

Redis
createClient(array $config)

Create the Redis client instance.

void
establishConnection(Redis $client, array $config)

Establish a connection with the Redis host.

RedisCluster
createRedisClusterInstance(array $servers, array $options)

Create a new redis cluster instance.

string
formatHost(array $options)

Format the host using the scheme if available.

Details

Connection connect(array $config, array $options)

Create a new clustered PhpRedis connection.

Parameters

array $config
array $options

Return Value

Connection

Connection connectToCluster(array $config, array $clusterOptions, array $options)

Create a new clustered PhpRedis connection.

Parameters

array $config
array $clusterOptions
array $options

Return Value

Connection

protected string buildClusterConnectionString(array $server)

Build a single cluster seed string from array.

Parameters

array $server

Return Value

string

protected Redis createClient(array $config)

Create the Redis client instance.

Parameters

array $config

Return Value

Redis

Exceptions

LogicException

protected void establishConnection(Redis $client, array $config)

Establish a connection with the Redis host.

Parameters

Redis $client
array $config

Return Value

void

protected RedisCluster createRedisClusterInstance(array $servers, array $options)

Create a new redis cluster instance.

Parameters

array $servers
array $options

Return Value

RedisCluster

protected string formatHost(array $options)

Format the host using the scheme if available.

Parameters

array $options

Return Value

string