File
extends AbstractStorage
in package
Debug file storage class
Tags
Table of Contents
- JSON = 'JSON'
- Format constants
- PHP = 'PHP'
- $dir : string
- Storage dir
- $format : string
- Storage format (json, php or text)
- __construct() : mixed
- Constructor
- clear() : File
- Clear all debug data
- decodeValue() : mixed
- Decode the value based on the format
- delete() : File
- Delete debug data
- encodeValue() : string
- Encode the value based on the format
- get() : mixed
- Get debug data
- getDir() : string
- Get the storage dir
- getFormat() : string
- Get the storage format
- has() : bool
- Determine if debug data exists
- isJson() : bool
- Determine if the format is JSON
- isPhp() : bool
- Determine if the format is PHP
- save() : File
- Save debug data
- setDir() : File
- Set the current storage dir
- setFormat() : AbstractStorage
- Set the storage format
Constants
JSON
Format constants
public
mixed
JSON
= 'JSON'
PHP
public
mixed
PHP
= 'PHP'
Properties
$dir
Storage dir
protected
string
$dir
= null
$format
Storage format (json, php or text)
protected
string
$format
= null
Methods
__construct()
Constructor
public
__construct(string $dir[, string $format = null ]) : mixed
Instantiate the file storage object
Parameters
- $dir : string
- $format : string = null
Return values
mixed —clear()
Clear all debug data
public
clear() : File
Return values
File —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) : File
Parameters
- $id : string
Return values
File —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 —getDir()
Get the storage dir
public
getDir() : string
Return values
string —getFormat()
Get the storage format
public
getFormat() : 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 —save()
Save debug data
public
save(string $id, mixed $value) : File
Parameters
- $id : string
- $value : mixed
Return values
File —setDir()
Set the current storage dir
public
setDir(string $dir) : File
Parameters
- $dir : string
Tags
Return values
File —setFormat()
Set the storage format
public
setFormat(string $format) : AbstractStorage
Parameters
- $format : string