Extracted at 2014-06-26.
pike.ida.liu.se
[Top]
Fins
Fins.FinsController

Class Fins.FinsController

Description

this is the base Controller class in Fins. The controller is used to map incoming requests to functions that are called to handle the request.

event methods have this signature:

void func(Fins.Request request, Fins.Response response, mixed ... args);

where func is the name of the event that will trigger the event function to be called.

Note

When using FinServe, an event that produces no output will return a "unable to find a handler" 404 error. The event will still fire, though.


Inherit FinsBase

inherit Fins.FinsBase : FinsBase




Constant __uses_session

constant Fins.FinsController.__uses_session

Description

set this to zero to avoid session redirects


Constant __is_cacheable

constant Fins.FinsController.__is_cacheable

Description

set this to zero to prevent this controller from being cached in the request-to-controller mapping.


Variable __actions

mapping(string:function|string|object) Fins.FinsController.__actions

Description

Mapping of action names to actions.

By default, actions are looked up in a controller class by index. Sometimes, it's not possible to create such an index, such as when the desired index is a reserved word like 'object', or one already present in the controller but with a different purpose, like 'start'.

An entry may be placed in this mapping and it will be used as though there were a class member with the same name.

The presence of an entry in this mapping for a given action will take priority over any action defined within the controller class.