From 29955216d69ca08b69afe1ace71151839049c045 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sat, 7 Feb 2015 21:06:17 +0100 Subject: Added documentation --- docs/classes/response.html | 618 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 618 insertions(+) create mode 100644 docs/classes/response.html (limited to 'docs/classes/response.html') diff --git a/docs/classes/response.html b/docs/classes/response.html new file mode 100644 index 0000000..44b579c --- /dev/null +++ b/docs/classes/response.html @@ -0,0 +1,618 @@ + + + + + + API Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
+ + + +

\response

+

Provides a standard to base all responses to be called with AJAX on

+ + + +
+

Summary

+
+
+ Methods +
+
+ Properties +
+
+ Constants +
+
+
+
+ __construct()
+ __set()
+ __get()
+ __isset()
+ __unset()
+ http_response_code()
+ getJson()
+
+
+ No public properties found +
+
+ No constants found +
+
+
+
+ No protected methods found +
+
+ No protected properties found +
+
+ N/A +
+
+
+
+ No private methods found +
+
+ $response
+ $http_response_code
+
+
+ N/A +
+
+
+
+ +
+ + + +
+
+

Properties

+
+ +
+ +
+
+ +
+

$response

+
$response : 
+

The variable to keep the response in until output

+ + +

Type

+ +
+
+ +
+ +
+
+ +
+

$http_response_code

+
$http_response_code : 
+

The variable to keep the HTTP response code in until output

+ + +

Type

+ +
+
+ +
+ + + +
+

Methods

+ +
+ +
+
+ +
+

__construct()

+ +
__construct() 
+

Create a new instance

+ + + + + +
+
+ +
+ +
+
+ +
+

__set()

+ +
__set(string  $name, string  $value) 
+

Set a variable of the response

+ + +

Parameters

+ + + + + + + + + + + +
string$name

The name of the variable to set

string$value

The (new) value for the variable

+ + + +
+
+ +
+ +
+
+ +
+

__get()

+ +
__get(string  $name) : mixed
+

Get a variable of the response

+ + +

Parameters

+ + + + + + +
string$name

The name of the variable to get

+ + +

Returns

+ mixed + —

The value of the variable

+ +
+
+ +
+ +
+
+ +
+

__isset()

+ +
__isset(string  $name) : boolean
+

Check if a variable of the response is set

+ + +

Parameters

+ + + + + + +
string$name

The name of the variable to check

+ + +

Returns

+ boolean + —

True if the variable exists, false otherwise

+ +
+
+ +
+ +
+
+ +
+

__unset()

+ +
__unset(string  $name) 
+

Unset a variable of the response

+ + +

Parameters

+ + + + + + +
string$name

The variable to unset

+ + + +
+
+ +
+ +
+
+ +
+

http_response_code()

+ +
http_response_code(integer  $code = null) : integer|boolean
+

Get or set the HTTP response code

+

If a parameter is provided, it is used as the new HTTP response code, and a bool is returned for success or failure. Otherwise, the current one is returned.

+ +

Parameters

+ + + + + + +
integer$code

The new code

+ + +

Returns

+ integer|boolean + —

True on successful change, false on unsuccesful change, int when the current code is returned

+ +
+
+ +
+ +
+
+ +
+

getJson()

+ +
getJson() : string
+

Output the response in json

+ + + + +

Returns

+ string + —

The response in json format

+ +
+
+ +
+ +
+
+ + + + +
+ + + -- cgit v1.2.3