PHP Class JsonEncodeView, cakephp-rest-plugin

Author: Juan Basso
Author: Jonathan Dalrymple
Author: kvz
Inheritance: extends View
Mostrar archivo Open project: kvz/cakephp-rest-plugin

Public Properties

Property Type Description
$jsonTab

Public Methods

Method Description
_encode ( array $response ) : string PHP version independent json_encode
array_type ( array $array ) : string Determines array type ("vector" or "map"). Returns false if not an array at all.
encode ( $response, $pretty = false )
headers ( $Controller, $settings )
json_format ( string $json ) : string Pretty print JSON http://www.php.net/manual/en/function.json-encode.php#80339
render ( $action = null, $layout = null, $file = null )
utf8_encode_array ( array $array ) : array (Recursively) utf8_encode each value in an array.

Method Details

_encode() public method

Adapted from http://www.php.net/manual/en/function.json-encode.php#82904. Author: Steve (30-Apr-2008 05:35)
public _encode ( array $response ) : string
$response array
return string

array_type() public method

(I hope a native function will be introduced in some future release of PHP, because this check is inefficient and quite costly in worst case scenario.) http://www.php.net/manual/es/function.utf8-encode.php#75422
public array_type ( array $array ) : string
$array array The array to analyze
return string array type ("vector" or "map") or false if not an array

encode() public method

public encode ( $response, $pretty = false )

headers() public method

public headers ( $Controller, $settings )

json_format() public method

Pretty print JSON http://www.php.net/manual/en/function.json-encode.php#80339
public json_format ( string $json ) : string
$json string
return string

render() public method

public render ( $action = null, $layout = null, $file = null )

utf8_encode_array() public method

http://www.php.net/manual/es/function.utf8-encode.php#75422
public utf8_encode_array ( array $array ) : array
$array array
return array utf8_encoded

Property Details

$jsonTab public_oe property

public $jsonTab