Class JJsonResponse

Description

JSON Response class

  • since: 2.5

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


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

The response data

var array/object

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

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 44)

The main response message

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

Array of messages gathered in the JApplication object

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

Determines whether the request was successful

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

Constructor

  • since: 2.5
  • access: public
void __construct ([array/object $response = null], [string $message = null], [boolean $error = false])
  • array/object $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 122)

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 Mon, 25 Jun 2012 13:56:03 -0500 by phpDocumentor 1.4.4