Horde_Core_Ajax_Response_HordeCore_JsonHtml
extends Horde_Core_Ajax_Response_HordeCore
in package
Extends the base HordeCore object by outputting the JSON data in HTML format.
Copyright 2012-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Tags
Table of Contents
Properties
- $cssfiles : array<string|int, mixed>
- CSS files to be loaded by the browser.
- $data : mixed
- Response data to send to the browser.
- $jsfiles : array<string|int, mixed>
- JavaScript files to be loaded by the browser.
- $jsonhtml : bool
- If true, output HTML-ized JSON instead of application/json.
- $tasks : object
- Task data to send to the browser.
Methods
- __construct() : mixed
- Constructor.
- send() : mixed
- Send response data to browser.
- sendAndExit() : mixed
- Send response data to browser and ends script execution.
- _jsonData() : object
- HordeCore JSON responses are a structured object which always includes the response in the 'response' property.
Properties
$cssfiles
CSS files to be loaded by the browser.
public
array<string|int, mixed>
$cssfiles
= array()
Tags
$data
Response data to send to the browser.
public
mixed
$data
= \null
$jsfiles
JavaScript files to be loaded by the browser.
public
array<string|int, mixed>
$jsfiles
= array()
Tags
$jsonhtml
If true, output HTML-ized JSON instead of application/json.
public
bool
$jsonhtml
= \false
Tags
$tasks
Task data to send to the browser.
public
object
$tasks
= \null
Methods
__construct()
Constructor.
public
__construct([mixed $data = null ][, mixed $tasks = null ]) : mixed
Parameters
- $data : mixed = null
-
Response data to send to browser.
- $tasks : mixed = null
-
Task data to send to browser.
send()
Send response data to browser.
public
send() : mixed
sendAndExit()
Send response data to browser and ends script execution.
public
sendAndExit() : mixed
_jsonData()
HordeCore JSON responses are a structured object which always includes the response in the 'response' property.
protected
_jsonData() : object
The object may include a 'jsfiles' property, which is an array of URL-accessible javascript files to be loaded by the browser (since 2.10.0).
The object may include a 'msgs' property, which is an array of notification message objects with 3 properties: flags, message, and type.
The object may include a 'tasks' property, which is an array of keys (task names) / values (task data).
Return values
object —HordeCore JSON object.