This class is a REST interface to WebLab_Table instances.

see \global\WebLab_Table
author Jorgen Evens
package WebLab
subpackage Dispatcher

 Methods

__construct()

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

(non-PHPdoc)

__init() : boolean
Inherited

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

see \WebLab_Dispatcher_Module::__init()
inherited_from \WebLab_Dispatcher_WebService::__init()

Returns

boolean

(non-PHPdoc)

_default() 

This acts as a catch-all.

see \WebLab_Dispatcher_Module::_default()

Performs a create on the table using the equivalent create function.

create() 

Performs a delete on the table using the equivalent delete function.

delete() 

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

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

Parameters

$action

Returns

\*

Performs a search on the table using the equivalent find function.

find() 

Write data to the template

put(array $new_data) 
Inherited
inherited_from \WebLab_Dispatcher_WebService::put()

Parameters

$new_data

array

Performs an update on the table using the equivalent update function.

update() 

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

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

Returns

String

Answer request with an error

error(string $message, int $http_status_code) 
Inherited
inherited_from \WebLab_Dispatcher_WebService::error()

Parameters

$message

string

$http_status_code

int

Returns the table on which we should invoke the action.

getTable() : \WebLab_Table

Returns

Check for the correct request method

is(string $method) : boolean
Inherited
inherited_from \WebLab_Dispatcher_WebService::is()

Parameters

$method

string

Returns

boolean

 Properties

 

$data : array
Inherited
inherited_from \WebLab_Dispatcher_WebService::$$data
 

$layout 
Inherited
inherited_from \WebLab_Dispatcher_Module::$$layout
inherited_from \WebLab_Dispatcher_WebService::$$layout
 

$param 
Inherited
inherited_from \WebLab_Dispatcher_Module::$$param
inherited_from \WebLab_Dispatcher_WebService::$$param