Class Omeka_Plugin_Filters

Description

This class augments the behavior of the Omeka_Plugin_Broker class. methods on it can be transparently accessed from the plugin broker class via delegation. broker class seems to be getting pretty cluttered.

This class augments the behavior of the Omeka_Plugin_Broker class. The methods on it can be transparently accessed from the plugin broker class via delegation. This is more of an organizational thing because the plugin broker class seems to be getting pretty cluttered.

  • author: CHNM
  • copyright: Center for History and New Media, 2007-2008
  • todo: Separate the Media Adapter code in the plugin broker class into a similar class such as this.
  • since: 6/16/08

Located in /application/libraries/Omeka/Plugin/Filters.php (line 22)


	
			
Variable Summary
Method Summary
 Omeka_Plugin_Filters __construct (Omeka_Plugin_Broker $broker)
 void addFilter (string|array $filterName, callback $callback, [integer|null $priority = 10])
 mixed applyFilters (mixed $filterName, array $value, [ $otherParams = array()])
 array getFilters (string|array $hookName)
 string _getFilterKey (string|array $name)
 mixed __call (string $m, array $a)
Variables
Omeka_Plugin_Broker $_broker (line 42)

The plugin broker object.

The plugin broker object.

  • access: protected
array $_filters = array() (line 35)

Stores all defined filters.

Stores all defined filters. Storage in array where $_filters['filterName']['priority']['plugin'] = $hook;

  • todo: Should this storage method be merged into the Plugin Broker class? Probably. That way hooks and filters will be no different in the storage space (in the manner of Wordpress).
  • access: protected
Methods
Constructor __construct (line 44)
  • access: public
Omeka_Plugin_Filters __construct (Omeka_Plugin_Broker $broker)
addFilter (line 68)
void addFilter (string|array $filterName, callback $callback, [integer|null $priority = 10])
  • string|array $filterName
  • callback $callback
  • integer|null $priority
applyFilters (line 130)

Run an arbitrary value through a set of filters.

Run an arbitrary value through a set of filters.

mixed applyFilters (mixed $filterName, array $value, [ $otherParams = array()])
  • mixed $filterName
  • array $value: Set of filter callbacks.
  • array $otherParams: Optional set of parameters to pass in addition to the value to filter. If these are passed, they will show up as sequential arguments to the filter implementation after the value to filter.
getFilters (line 110)

Return all the filters for a specific hook in the correct order of execution.

Return all the filters for a specific hook in the correct order of execution.

  • access: public
array getFilters (string|array $hookName)
  • string|array $hookName
_getFilterKey (line 98)

Retrieve the key used for indexing the filter. either a string or an array of strings. that might cause fiery death when using the serialized value for an array key.

Retrieve the key used for indexing the filter. The filter name should be either a string or an array of strings. If the filter name is an object, that might cause fiery death when using the serialized value for an array key.

  • see: Omeka_Plugin_Filters::addFilters()
  • access: protected
string _getFilterKey (string|array $name)
  • string|array $name
_getFilterNamespace (line 79)

Retrieve the namespace to use for the filter to be added.

Retrieve the namespace to use for the filter to be added.

  • return: Name of the current plugin (if applicable). Otherwise it is a magic constant that denotes globally applied filters.
  • access: protected
string _getFilterNamespace ()
__call (line 56)

Delegate transparently to the Omeka_Plugin_Broker object.

Delegate transparently to the Omeka_Plugin_Broker object.

  • access: public
mixed __call (string $m, array $a)
  • string $m
  • array $a

Documentation generated on Thu, 15 Oct 2009 15:37:28 -0400 by phpDocumentor 1.4.2