Methods
Get redis resource database
getDatabase(string $id) : string
Parameters
$id
string
Returns
string
Get one Redis option
getLibOption(string $id, string | int $key) : mixed
Parameters
$id
string
$key
stringint
Exceptions
Returns
mixed
Get Redis options
getLibOptions(string $id) : array
Parameters
$id
string
Exceptions
Returns
array
Get redis server version
getMajorVersion(string $id) : int
Parameters
$id
string
Exceptions
Returns
int
Get redis server version
getMayorVersion(string $id) : int
deprecated |
2.2.2 Use getMajorVersion instead |
Parameters
$id
string
Exceptions
Returns
int
Get redis resource password
getPassword(string $id) : string
Parameters
$id
string
Returns
string
Get the persistent id
getPersistentId(string $id) : string
Parameters
$id
string
Exceptions
Returns
string
Get server
getServer(string $id) : array
Parameters
$id
string
Exceptions
Returns
array
array('host' =>
[, 'port' => [, 'timeout' => ]])
Check if a resource exists
hasResource(string $id) : bool
Parameters
$id
string
Returns
bool
Set redis password
setPassword(string $id, string $password) : \Redis
Parameters
$id
string
$password
string
Returns
\Redis
Set server
setServer(string $id, string | array $server) : \Zend\Cache\Storage\Adapter\RedisResourceManager
Server can be described as follows:
- URI: /path/to/sock.sock
- Assoc: array('host' => [, 'port' => [, 'timeout' => ]])
- List: array([, , [, ]])
Parameters
$id
string
$server
stringarray
Returns
Connects to redis server
connect(array $resource) : null
Parameters
$resource
array
& $resource
Exceptions
Returns
null
Convert option name into it's constant value
normalizeLibOptionKey(string | int $key)
Parameters
$key
stringint
Exceptions
Normalize Redis options
normalizeLibOptions(array | \Traversable $libOptions)
Parameters
$libOptions
array\Traversable
Exceptions
Normalize the persistent id
normalizePersistentId(string $persistentId)
Parameters
$persistentId
string
Normalize one server into the following format:
array('host' => <host>[, 'port' => <port>[, 'timeout' => <timeout>]])
normalizeServer(string | array $server)
Parameters
$server
stringarray
Exceptions
Properties
Registered resources
$resources : array