Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($status=true, $content='', $elementId='0', $additionalAttributes=null) | |
getAdditionalAttributes () | |
getContent () | |
getElementId () | |
getEvents () | |
getStatus () | |
getString () | |
setAdditionalAttributes ($additionalAttributes) | |
setContent ($content) | |
setElementId ($elementId) | |
setEvent ($eventName, $eventData=null) | |
setGlobalEvent ($eventName, $eventData=array()) | |
setStatus ($status) | |
Data Fields | |
$_additionalAttributes | |
$_content | |
$_elementId | |
$_events | |
$_status | |
Class to represent a JSON (Javascript Object Notation) message.
Definition at line 18 of file JSONMessage.inc.php.
JSONMessage::__construct | ( | $status = true , |
|
$content = '' , |
|||
$elementId = '0' , |
|||
$additionalAttributes = null |
|||
) |
Constructor.
$status | boolean The status of an event (e.g. false if form validation fails). |
$content | Mixed The message to be delivered back to the calling script. |
$elementId | string The DOM element to be replaced. |
$additionalAttributes | array Additional data to be returned. |
Definition at line 56 of file JSONMessage.inc.php.
References setAdditionalAttributes(), setContent(), setElementId(), and setStatus().
JSONMessage::getAdditionalAttributes | ( | ) |
Get the additionalAttributes array
Definition at line 161 of file JSONMessage.inc.php.
References $_additionalAttributes.
Referenced by getString().
JSONMessage::getContent | ( | ) |
Get the content string
Definition at line 87 of file JSONMessage.inc.php.
References $_content.
Referenced by getString().
JSONMessage::getElementId | ( | ) |
Get the elementId string
Definition at line 103 of file JSONMessage.inc.php.
References $_elementId.
Referenced by getString().
JSONMessage::getEvents | ( | ) |
Get the events to trigger with this JSON message
Definition at line 153 of file JSONMessage.inc.php.
References $_events.
Referenced by getString().
JSONMessage::getStatus | ( | ) |
Get the status string
Definition at line 70 of file JSONMessage.inc.php.
References $_status.
Referenced by getString().
JSONMessage::getString | ( | ) |
Construct a JSON string to use for AJAX communication
Definition at line 178 of file JSONMessage.inc.php.
References getAdditionalAttributes(), getContent(), getElementId(), getEvents(), and getStatus().
JSONMessage::setAdditionalAttributes | ( | $additionalAttributes | ) |
Set the additionalAttributes array
$additionalAttributes | array |
Definition at line 169 of file JSONMessage.inc.php.
Referenced by __construct().
JSONMessage::setContent | ( | $content | ) |
Set the content data
$content | mixed |
Definition at line 95 of file JSONMessage.inc.php.
Referenced by __construct().
JSONMessage::setElementId | ( | $elementId | ) |
Set the elementId string
$elementId | string |
Definition at line 111 of file JSONMessage.inc.php.
Referenced by __construct().
JSONMessage::setEvent | ( | $eventName, | |
$eventData = null |
|||
) |
Set the event to trigger with this JSON message
$eventName | string |
$eventData | mixed |
Definition at line 121 of file JSONMessage.inc.php.
Referenced by setGlobalEvent().
JSONMessage::setGlobalEvent | ( | $eventName, | |
$eventData = array() |
|||
) |
Set a global event to trigger with this JSON message
This is a wrapper for the setEvent method.
Global events are triggered on the global event router instead of being triggered directly on the handler. They are intended for broadcasting updates from one handler to other handlers.
$eventName | string |
$eventData | array Global event data must be an assoc array |
Definition at line 143 of file JSONMessage.inc.php.
References setEvent().
JSONMessage::setStatus | ( | $status | ) |
Set the status string
$status | string |
Definition at line 78 of file JSONMessage.inc.php.
Referenced by __construct().
array JSONMessage::$_additionalAttributes |
Set of additional attributes for special cases.
Definition at line 47 of file JSONMessage.inc.php.
Referenced by getAdditionalAttributes().
Mixed JSONMessage::$_content |
The message to be delivered back to the calling script.
Definition at line 29 of file JSONMessage.inc.php.
Referenced by getContent().
string JSONMessage::$_elementId |
ID for DOM element that will be replaced.
Definition at line 35 of file JSONMessage.inc.php.
Referenced by getElementId().
array JSONMessage::$_events |
List of JS events generated on the server side.
Definition at line 41 of file JSONMessage.inc.php.
Referenced by getEvents().
string JSONMessage::$_status |
The status of an event (e.g. false if form validation fails).
Definition at line 23 of file JSONMessage.inc.php.
Referenced by getStatus().