Class JJsonResponse

Description

JSON Response class

  • deprecated: 4.0
  • since: 2.5

Located in /administrator/components/com_languages/helpers/jsonresponse.php (line 20)


	
			
Variable Summary
 mixed $data
 boolean $error
 string $message
 array $messages
 boolean $success
Method Summary
 JJsonResponse __construct ([mixed $response = null], [string $message = null], [boolean $error = false])
 string __toString ()
Variables
mixed $data = null (line 62)

The response data

  • since: 2.5
  • access: public
boolean $error = false (line 38)

Determines whether the request wasn't successful.

This is always the negation of $this->success, so you can use both flags equivalently.

  • since: 2.5
  • access: public
string $message = null (line 46)

The main response message

  • since: 2.5
  • access: public
array $messages = null (line 54)

Array of messages gathered in the JApplication object

  • since: 2.5
  • access: public
boolean $success = true (line 28)

Determines whether the request was successful

  • since: 2.5
  • access: public
Methods
Constructor __construct (line 74)

Constructor

  • deprecated: 4.0 Use JResponseJson instead
  • since: 2.5
  • access: public
JJsonResponse __construct ([mixed $response = null], [string $message = null], [boolean $error = false])
  • mixed $response: The Response data
  • string $message: The main response message
  • boolean $error: True, if the success flag shall be set to false, defaults to false
__toString (line 125)

Magic toString method for sending the response in JSON format

  • return: The response in JSON format
  • since: 2.5
  • access: public
string __toString ()

Documentation generated on Tue, 19 Nov 2013 15:06:19 +0100 by phpDocumentor 1.4.3