Class Filter

Description

Filter is a base class for service filters.

Filters should implement one or more of the following methods:

  • Filter::pre( ) Executed right before the Service Action is performed
  • Filter::inter( ) Executed right after the Service Action is performed but before a View will be rendered
  • Filter::post( ) Executed after the Service Action is performed and the View is rendered
Filters can be registered directly into the Disptacher or attached to a single Service. They can also be attached to a specific method of a Service.

  • todo: support other Response types than HTTP on post filtering

Located in /filter.php (line 26)

PHOOL
   |
   --Filter
Direct descendents
Class Description
Convert Iconvert is a Toolset for Input/Output Conversion Filters.
Sanitize Sanitize is an input filter to remove XSS hacks from input values.
Requestlog The Requestlog filter tracks Request execution stages
Variable Summary
string $service
Method Summary
Filter Filter ()
Forward &inter (Forward &$forward)
Request|Forward pre (Request &$request)
void set_service (string $service)
Variables
string $service (line 32)

The Service name where the filter is currently attached to

  • access: protected

Inherited Variables

Inherited from PHOOL

PHOOL::$debug
PHOOL::$errorlabels
PHOOL::$errorlevels
PHOOL::$errors
PHOOL::$exists
PHOOL::$logdir
PHOOL::$loglevel
PHOOL::$objname
Methods
Constructor Filter (line 37)

Construct a filter object and register data container

Filter Filter ()
inter (line 72)

Filter service return value before rendering begins

Forward &inter (Forward &$forward)

Redefined in descendants as:
post (line 82)

Filter Response

HTTPResponse &post (HTTPResponse &$response)

Redefined in descendants as:
pre (line 62)

Filter request data before the service action begins

May return a Forward object if the filter needs to tweak application control.

Request|Forward pre (Request &$request)

Redefined in descendants as:
set_service (line 48)

Update the current service name

void set_service (string $service)
  • string $service: name of service

Inherited Methods

Inherited From PHOOL

PHOOL::PHOOL()
PHOOL::debug()
PHOOL::error()
PHOOL::get_errors()
PHOOL::handle_error()
PHOOL::has_error()
PHOOL::log_error()
PHOOL::set_debug()
PHOOL::set_logdir()
PHOOL::set_loglevel()
Class Constants

Inherited Constants

Inherited from PHOOL

PHOOL::ERROR
PHOOL::UNKNOWN
PHOOL::USER
PHOOL::WARNING

Documentation generated on Tue, 12 May 2009 23:09:38 +0200 by phpDocumentor 1.4.1