PHP Class JBZoo\Data\JSON

Inheritance: extends Data
Mostrar archivo Open project: jbzoo/data Class Usage Examples

Protected Methods

Method Description
_decode ( string $string ) : mixed Utility Method to unserialize the given data
_encode ( $data ) : string Utility Method to unserialize the given data
_render ( array | object $data, integer $indent ) : string Do the real json encoding adding human readability. Supports automatic indenting with tabs

Method Details

_decode() protected method

Utility Method to unserialize the given data
protected _decode ( string $string ) : mixed
$string string
return mixed

_encode() protected method

Utility Method to unserialize the given data
protected _encode ( $data ) : string
$data
return string

_render() protected method

Do the real json encoding adding human readability. Supports automatic indenting with tabs
protected _render ( array | object $data, integer $indent ) : string
$data array | object The array or object to encode in json
$indent integer The indentation level. Adds $indent tabs to the string
return string