Methods for handling JSON output, usually for AJAX responses
This is the code documentation for the SproutCMS project
Search documentation |
class JsonMethods for handling JSON output, usually for AJAX responses
Functions
public confirmvoid Json::confirm ( [ mixed $data ] ); Sends a JSON confirmation response, and then terminates. The returned data will have the key 'success' => 1 added. If no data is provided, the returned JSON will only contain the 'success' key. This method halts execution public errorvoid Json::error ( mixed $message ); Sends a JSON message which has the success field set to zero and the specified message in the message field. If $message is an Exception object, the message will be extracted and if on the test server, a stacktrace is included as well. This method halts execution public outvoid Json::out ( mixed $data [, int $options ] ); Outputs the JSON data (encoded) + correct mime type, then stops script execution |
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Tuesday, 15th September, 2026 at 10:26 am |
|