Back to Joomla project (class list)

Class JsonResponse - list of methods

JSON Response class.
This class serves to provide the Joomla Platform with a common interface to access response variables for e.g. Ajax requests.
Package: Joomla\CMS\Response
Copyright: (C) 2013 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Response/JsonResponse.php
Project: Joomla

Method Summary

public
(mixed $response = null, mixed $message = null, mixed $error = false, mixed $ignoreMessages = false)

Constructor
Parameters
  • mixed $response The Response data
  • string $message The main response message
  • bool $error True, if the success flag shall be set to false, defaults to false
  • bool $ignoreMessages True, if the message queue shouldn't be included, defaults to false
Since
  • 3.1
Show source code of this method: __construct Source Code

public string
()

Magic toString method for sending the response in JSON format
Returns
  • string The response in JSON format
Since
  • 3.1
Show source code of this method: __toString Source Code

Properties Summary

public bool
$success
Determines whether the request was successful
Since
  • 3.1
public string
$message
The main response message
Since
  • 3.1
public array
$messages
Array of messages gathered in the Application object
Since
  • 3.1
public mixed
$data
The response data
Since
  • 3.1

Tags Summary

Since
3.1