Class Amfphp_Core_FilterManager

Description

This class is a kind of event dispatcher

Filters are provided by Amfphp to allow your contexts to 'filter into' the rest of Amfphp, i.e. to call functions in your context at specific times
This is a singleton, so use getInstance

  • author: Ariel Sommeria-klein

Located in /Amfphp/Core/FilterManager.php (line 19)


	
			
Variable Summary
static mixed $instance
Method Summary
Amfphp_Core_FilterManager __construct ()
void addFilter (String $filterName, Object $object, String $methodName)
mixed callFilters (String $filterName, parameters 1)
Variables
static mixed $instance = NULL (line 28)

protected instance of singleton

  • access: protected
mixed $filtersArray = NULL (line 23)

registered filters

  • access: protected
Methods
static method getInstance (line 40)
  • access: public
static Amfphp_Core_FilterManager getInstance ()
Constructor __construct (line 32)

constructor

  • access: protected
Amfphp_Core_FilterManager __construct ()
addFilter (line 89)

register an object method for the given filter

call this method in your contexts to be notified when the filter occures

void addFilter (String $filterName, Object $object, String $methodName)
  • String $filterName: the name of the filter
  • Object $object: the object on which to call the method
  • String $methodName: the name of the method to call on the object
callFilters (line 56)

call the functions registered for the given filter. There can be as many parameters as necessary, but only the first one can be changed and and returned by the callees.

The other parameters must be considered as context, and should not be modified by the callees, and will not be returned to the caller.

  • return: the first call parameter, as filtered by the callees.
  • access: public
mixed callFilters (String $filterName, parameters 1)
  • String $filterName: the name of the filter which was used in addFilter( a string)
  • parameters 1: for the function call. As many as necessary can be passed, but only the first will be filtered

Documentation generated on Mon, 23 Jan 2012 17:22:05 -0300 by phpDocumentor 1.4.3