JsonResponse
JSON Response class.
This class serves to provide the Joomla Platform with a common interface to access response variables for e.g. Ajax requests.
| since |
3.1 |
|---|---|
| package |
Joomla CMS |
Methods
__construct
Constructor
__construct(mixed response = null, string message = null, bool error = false, bool ignoreMessages = false) : mixed
| since |
3.1 |
|---|
Arguments
- response
mixedThe Response data- message
stringThe main response message- error
boolTrue, if the success flag shall be set to false, defaults to false- ignoreMessages
boolTrue, if the message queue shouldn't be included, defaults to false
Response
mixed
__toString
Magic toString method for sending the response in JSON format
__toString() : string
| since |
3.1 |
|---|
Response
stringThe response in JSON format
Properties
success
Determines whether the request was successful
| since |
3.1 |
|---|
Type(s)
bool
message
The main response message
| since |
3.1 |
|---|
Type(s)
string
messages
Array of messages gathered in the \JApplication object
| since |
3.1 |
|---|
Type(s)
array
data
The response data
| since |
3.1 |
|---|
Type(s)
mixed