class RedisSaver implements SaverInterface (View source)

Traits

Properties

protected Redis $connection

Methods

Generator|string[]
paginatedScan(Redis $redis, string $pattern)

Scan for a specific key pattern

Generator|array
paginatedScanValues(Redis $redis, string $pattern)

Get the keys and values matching a pattern

__construct(Redis $redis)

No description

bool
save(string $item, string $value, string $environment, string $group, string|null $namespace = null)

Save config item.

array
flattenValue($namespace, $group, $item, mixed $value)

Flatten a given value into a list of keys => serialized values ['a' => ['b' => 'c']] would become ['a.b' => 's:1:"c";']

Details

protected Generator|string[] paginatedScan(Redis $redis, string $pattern)

Scan for a specific key pattern

Parameters

Redis $redis
string $pattern

The pattern to search for ex: foo, *, foo.*

Return Value

Generator|string[]

A list of keys that match the pattern

protected Generator|array paginatedScanValues(Redis $redis, string $pattern)

Get the keys and values matching a pattern

Parameters

Redis $redis
string $pattern

The pattern to search for ex: foo, *, foo.*

Return Value

Generator|array

A list of key => value results

__construct(Redis $redis)

No description

Parameters

Redis $redis

bool save(string $item, string $value, string $environment, string $group, string|null $namespace = null)

Save config item.

Parameters

string $item
string $value
string $environment
string $group
string|null $namespace

Return Value

bool

protected array flattenValue($namespace, $group, $item, mixed $value)

Flatten a given value into a list of keys => serialized values ['a' => ['b' => 'c']] would become ['a.b' => 's:1:"c";']

Parameters

$namespace
$group
$item
mixed $value

Return Value

array