PhpRedisConnector
class PhpRedisConnector implements Connector (View source)
Methods
Create a new connection.
Create a new clustered PhpRedis connection.
Build a single cluster seed string from an array.
Create the Redis client instance.
Establish a connection with the Redis host.
Create a new redis cluster instance.
Format the host using the scheme if available.
Normalize the SSL context for a single Redis connection.
Normalize the SSL context for a RedisCluster connection.
Format the password for a Redis cluster connection.
Parse a "friendly" backoff algorithm name into an integer.
Details
Connection
connect(array $config, array $options)
Create a new connection.
Connection
connectToCluster(array $config, array $clusterOptions, array $options)
Create a new clustered PhpRedis connection.
protected string
buildClusterConnectionString(array $server)
Build a single cluster seed string from an array.
protected Redis
createClient(array $config)
Create the Redis client instance.
protected void
establishConnection(Redis $client, array $config)
Establish a connection with the Redis host.
protected RedisCluster
createRedisClusterInstance(array $servers, array $options)
Create a new redis cluster instance.
protected string
formatHost(array $options)
Format the host using the scheme if available.
protected array
normalizeContext(array $context)
Normalize the SSL context for a single Redis connection.
Redis::connect() expects the context as ['stream' => ['verify_peer' => false, ...]].
protected array
normalizeClusterContext(array $context)
Normalize the SSL context for a RedisCluster connection.
RedisCluster::__construct() expects a flat context ['verify_peer' => false, ...].
protected string|array|null
formatClusterPassword(array $options)
Format the password for a Redis cluster connection.
protected int
parseBackoffAlgorithm(mixed $algorithm)
Parse a "friendly" backoff algorithm name into an integer.