\Pop\Debug\StorageRedis

Debug redis storage class

Summary

Methods
Properties
Constants
__construct()
setFormat()
isText()
isPhp()
isJson()
getFormat()
save()
get()
has()
delete()
clear()
encodeValue()
redis()
getVersion()
No public properties found
No constants found
No protected methods found
$format
$redis
N/A
No private methods found
No private properties found
N/A

Properties

$format

$format : string

Storage format

Type

string

$redis

$redis : \Redis

Redis object

Type

\Redis

Methods

__construct()

__construct(string  $format = 'json', string  $host = 'localhost', integer  $port = 6379) 

Constructor

Instantiate the Redis storage object

Parameters

string $format
string $host
integer $port

Throws

\Pop\Debug\Storage\Exception

isText()

isText() : boolean

Determine if the format is text

Returns

boolean

isPhp()

isPhp() : boolean

Determine if the format is PHP

Returns

boolean

isJson()

isJson() : boolean

Determine if the format is JSON

Returns

boolean

getFormat()

getFormat() : string

Get the storage format

Returns

string

save()

save(string  $id, mixed  $value) : \Pop\Debug\Storage\Redis

Save debug data

Parameters

string $id
mixed $value

Returns

\Pop\Debug\Storage\Redis

get()

get(string  $id) : mixed

Get debug data

Parameters

string $id

Returns

mixed

has()

has(string  $id) : boolean

Determine if debug data exists

Parameters

string $id

Returns

boolean

delete()

delete(string  $id) : \Pop\Debug\Storage\Redis

Delete debug data

Parameters

string $id

Returns

\Pop\Debug\Storage\Redis

encodeValue()

encodeValue(mixed  $value) : string

Encode the value based on the format

Parameters

mixed $value

Throws

\Pop\Debug\Storage\Exception

Returns

string

redis()

redis() : \Redis

Get the redis object.

Returns

\Redis

getVersion()

getVersion() : string

Get the current version of redis.

Returns

string