Methods

after()

after($response) 

Parameters

$response

before()

before() 

Router

router(string $resource, array $arguments) : bool | mixed

Requests are not made to methods directly The request will be for an "object". this simply maps the object and method to the correct Controller method.

Parameters

$resource

string

$arguments

array

Returns

boolmixed

Detect format

_detect_format() : string

Detect which format should be used to output the data

Returns

string

Detect language(s)

_detect_lang() : null | array | string

What language do they want it in?

Returns

nullarraystring

_prepare_basic_auth()

_prepare_basic_auth() 

_prepare_digest_auth()

_prepare_digest_auth() 

Set the Response http status.

http_status(integer $status) : void

Parameters

$status

integer

response http status code

Response

response($data, $http_status) : object

Takes pure data and optionally a status code, then creates the response

Parameters

$data

mixed

$http_status

int

Returns

objectResponse instance

 Properties

 

<p>List all supported methods</p>

$_supported_formats : array

 

<p>authentication to be used for this controller</p>

$auth : string

 

<p>the detected response format</p>

$format : string

 

<p>default response http status</p>

$http_status : integer

 

<p>contains a list of method properties such as limit, log and level</p>

$methods : array

 

<p>status code to return in case the called action doesn't return data</p>

$no_data_status : integer

 

<p>status code to return in case a not defined action is called</p>

$no_method_status : integer

 

<p>Set this in a controller to use a default format</p>

$rest_format : null | string

 

<p>xml basenode name</p>

$xml_basenode : string