A base implementation for a REST WebService.

author Jorgen Evens
package WebLab
subpackage Dispatcher

 Methods

__construct()

__construct() 
Inherited
inherited_from \WebLab_Dispatcher_Module::__construct()

(non-PHPdoc)

__init() : boolean

Authentication or denying access can be done here. If returned true, execute will be called. Otherwise it will not.

see \WebLab_Dispatcher_Module::__init()

Returns

boolean

(non-PHPdoc)

_default() 

This acts as a catch-all.

see \WebLab_Dispatcher_Module::_default()

Called if __init returns true, will do the routing to the correct action.

execute($action) : \*
Inherited
inherited_from \WebLab_Dispatcher_Module::execute()

Parameters

$action

Returns

\*

Write data to the template

put(array $new_data) 

Parameters

$new_data

array

Define the name of the module, this makes reading the action more robust.

_getName() : String
Inherited
inherited_from \WebLab_Dispatcher_Module::_getName()

Returns

String

Answer request with an error

error(string $message, int $http_status_code) 

Parameters

$message

string

$http_status_code

int

Check for the correct request method

is(string $method) : boolean

Parameters

$method

string

Returns

boolean

 Properties

 

$data : array
 

$layout 
Inherited
inherited_from \WebLab_Dispatcher_Module::$$layout
 

$param 
Inherited
inherited_from \WebLab_Dispatcher_Module::$$param