RedisCaster
in package
Casts Redis class from ext-redis to array representation.
Tags
Table of Contents
- COMPRESSION_MODES = [ 0 => 'NONE', // Redis::COMPRESSION_NONE 1 => 'LZF', ]
- FAILOVER_OPTIONS = [RedisCluster::FAILOVER_NONE => 'NONE', RedisCluster::FAILOVER_ERROR => 'ERROR', RedisCluster::FAILOVER_DISTRIBUTE => 'DISTRIBUTE', RedisCluster::FAILOVER_DISTRIBUTE_SLAVES => 'DISTRIBUTE_SLAVES']
- MODES = [Redis::ATOMIC => 'ATOMIC', Redis::MULTI => 'MULTI', Redis::PIPELINE => 'PIPELINE']
- SERIALIZERS = [Redis::SERIALIZER_NONE => 'NONE', Redis::SERIALIZER_PHP => 'PHP', 2 => 'IGBINARY']
- castRedis() : mixed
- castRedisArray() : mixed
- castRedisCluster() : mixed
- getRedisOptions() : EnumStub
Constants
COMPRESSION_MODES
private
mixed
COMPRESSION_MODES
= [
0 => 'NONE',
// Redis::COMPRESSION_NONE
1 => 'LZF',
]
FAILOVER_OPTIONS
private
mixed
FAILOVER_OPTIONS
= [RedisCluster::FAILOVER_NONE => 'NONE', RedisCluster::FAILOVER_ERROR => 'ERROR', RedisCluster::FAILOVER_DISTRIBUTE => 'DISTRIBUTE', RedisCluster::FAILOVER_DISTRIBUTE_SLAVES => 'DISTRIBUTE_SLAVES']
MODES
private
mixed
MODES
= [Redis::ATOMIC => 'ATOMIC', Redis::MULTI => 'MULTI', Redis::PIPELINE => 'PIPELINE']
SERIALIZERS
private
mixed
SERIALIZERS
= [Redis::SERIALIZER_NONE => 'NONE', Redis::SERIALIZER_PHP => 'PHP', 2 => 'IGBINARY']
Methods
castRedis()
public
static castRedis(Redis $c, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $c : Redis
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castRedisArray()
public
static castRedisArray(RedisArray $c, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $c : RedisArray
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castRedisCluster()
public
static castRedisCluster(RedisCluster $c, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $c : RedisCluster
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —getRedisOptions()
private
static getRedisOptions(Redis|RedisArray|RedisCluster $redis[, array<string|int, mixed> $options = [] ]) : EnumStub
Parameters
- $redis : Redis|RedisArray|RedisCluster
- $options : array<string|int, mixed> = []