json_Core Class Reference

Help class for handling JSON encode or decode since we can't always know for sure that we have the built-in PHP json_encode function and should use ZEND_Json instead. More...

Static Public Member Functions

static fail ($reason=null, $http_status_code=500)
 Give it anything, it will turn it into JSON.
static ok ($result=null, $http_status_code=200)
 Give it anything, it will turn it into JSON.

Detailed Description

Help class for handling JSON encode or decode since we can't always know for sure that we have the built-in PHP json_encode function and should use ZEND_Json instead.


Member Function Documentation

static json_Core::fail ( reason = null,
http_status_code = 500 
) [static]

Give it anything, it will turn it into JSON.

Parameters:
$reason string
$http_status_code int = 500
static json_Core::ok ( result = null,
http_status_code = 200 
) [static]

Give it anything, it will turn it into JSON.

Parameters:
$result string
$http_status_code int = 200

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 6 May 2013 for ninja by  doxygen 1.6.1