Redis
extends AbstractStorage
in package
Debug redis storage class
Tags
Table of Contents
- JSON = 'JSON'
- Format constants
- PHP = 'PHP'
- $format : string
- Storage format (json, php or text)
- $redis : Redis
- Redis object
- __construct() : mixed
- Constructor
- clear() : Redis
- Clear all debug data
- decodeValue() : mixed
- Decode the value based on the format
- delete() : Redis
- Delete debug data
- encodeValue() : string
- Encode the value based on the format
- get() : mixed
- Get debug data
- getFormat() : string
- Get the storage format
- getVersion() : string
- Get the current version of redis.
- has() : bool
- Determine if debug data exists
- isJson() : bool
- Determine if the format is JSON
- isPhp() : bool
- Determine if the format is PHP
- redis() : Redis
- Get the redis object.
- save() : Redis
- Save debug data
- setFormat() : AbstractStorage
- Set the storage format
Constants
JSON
Format constants
public
mixed
JSON
= 'JSON'
PHP
public
mixed
PHP
= 'PHP'
Properties
$format
Storage format (json, php or text)
protected
string
$format
= null
$redis
Redis object
protected
Redis
$redis
= null
Methods
__construct()
Constructor
public
__construct([string $format = null ][, string $host = 'localhost' ][, int $port = 6379 ]) : mixed
Instantiate the Redis storage object
Parameters
- $format : string = null
- $host : string = 'localhost'
- $port : int = 6379
Tags
Return values
mixed —clear()
Clear all debug data
public
clear() : Redis
Return values
Redis —decodeValue()
Decode the value based on the format
public
decodeValue(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —delete()
Delete debug data
public
delete(string $id) : Redis
Parameters
- $id : string
Return values
Redis —encodeValue()
Encode the value based on the format
public
encodeValue(mixed $value) : string
Parameters
- $value : mixed
Tags
Return values
string —get()
Get debug data
public
get(string $id) : mixed
Parameters
- $id : string
Return values
mixed —getFormat()
Get the storage format
public
getFormat() : string
Return values
string —getVersion()
Get the current version of redis.
public
getVersion() : string
Return values
string —has()
Determine if debug data exists
public
has(string $id) : bool
Parameters
- $id : string
Return values
bool —isJson()
Determine if the format is JSON
public
isJson() : bool
Return values
bool —isPhp()
Determine if the format is PHP
public
isPhp() : bool
Return values
bool —redis()
Get the redis object.
public
redis() : Redis
Return values
Redis —save()
Save debug data
public
save(string $id, mixed $value) : Redis
Parameters
- $id : string
- $value : mixed
Return values
Redis —setFormat()
Set the storage format
public
setFormat(string $format) : AbstractStorage
Parameters
- $format : string