Documentation

Horde_Core_Ajax_Response_HordeCore extends Horde_Core_Ajax_Response
in package

A data object that represents the full JSON data expected by the HordeCore javascript framework.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2012-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

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
since
2.25.0

$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
since
2.10.0

$jsonhtml

If true, output HTML-ized JSON instead of application/json.

public bool $jsonhtml = \false
Tags
since
2.12.0

$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.


        
On this page

Search results