\Pop\Debug\StorageFile

Debug file storage class

Summary

Methods
Properties
Constants
__construct()
setFormat()
isPhp()
isJson()
getFormat()
save()
get()
has()
delete()
clear()
encodeValue()
decodeValue()
setDir()
getDir()
No public properties found
JSON
PHP
No protected methods found
$format
$dir
N/A
No private methods found
No private properties found
N/A

Constants

JSON

JSON = 'JSON'

Format constants

PHP

PHP = 'PHP'

Properties

$format

$format : string

Storage format (json, php or text)

Type

string

$dir

$dir : string

Storage dir

Type

string

Methods

__construct()

__construct(string  $dir, string  $format = null) 

Constructor

Instantiate the file storage object

Parameters

string $dir
string $format

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\File

Save debug data

Parameters

string $id
mixed $value

Returns

\Pop\Debug\Storage\File

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\File

Delete debug data

Parameters

string $id

Returns

\Pop\Debug\Storage\File

encodeValue()

encodeValue(mixed  $value) : string

Encode the value based on the format

Parameters

mixed $value

Throws

\Pop\Debug\Storage\Exception

Returns

string

decodeValue()

decodeValue(mixed  $value) : mixed

Decode the value based on the format

Parameters

mixed $value

Returns

mixed

setDir()

setDir(string  $dir) : \Pop\Debug\Storage\File

Set the current storage dir

Parameters

string $dir

Throws

\Pop\Debug\Storage\Exception

Returns

\Pop\Debug\Storage\File

getDir()

getDir() : string

Get the storage dir

Returns

string