Zend Framework
3.0
|
Public Member Functions | |
__construct ($options=null) | |
Initialize filter chain. | |
setOptions ($options) | |
count () | |
Return the count of attached filters. | |
getPluginManager () | |
Get plugin manager instance. | |
setPluginManager (FilterPluginManager $plugins) | |
Set plugin manager instance. | |
plugin ($name, array $options=[]) | |
Retrieve a filter plugin by name. | |
attach ($callback, $priority=self::DEFAULT_PRIORITY) | |
Attach a filter to the chain. | |
attachByName ($name, $options=[], $priority=self::DEFAULT_PRIORITY) | |
Attach a filter to the chain using a short name. | |
merge (FilterChain $filterChain) | |
Merge the filter chain with the one given in parameter. | |
getFilters () | |
Get all the filters. | |
filter ($value) | |
Returns $value filtered through each filter in the chain. | |
__clone () | |
Clone filters. | |
__sleep () | |
Prepare filter chain for serialization. | |
Public Member Functions inherited from AbstractFilter | |
setOptions ($options) | |
getOptions () | |
Retrieve options representing object state. | |
__invoke ($value) | |
Invoke filter as a command. | |
Public Attributes | |
const | DEFAULT_PRIORITY = 1000 |
Default priority at which filters are added. | |
Protected Attributes | |
$plugins | |
$filters | |
Protected Attributes inherited from AbstractFilter | |
$options = [] | |
Additional Inherited Members | |
Static Public Member Functions inherited from AbstractFilter | |
static | hasPcreUnicodeSupport () |
Static Protected Member Functions inherited from AbstractFilter | |
static | isOptions ($options) |
__construct | ( | $options = null | ) |
Initialize filter chain.
null | array | Traversable | $options |
__clone | ( | ) |
Clone filters.
__sleep | ( | ) |
Prepare filter chain for serialization.
Plugin manager (property 'plugins') cannot be serialized. On wakeup the property remains unset and next invocation to getPluginManager() sets the default plugin manager instance (FilterPluginManager).
attach | ( | $callback, | |
$priority = self::DEFAULT_PRIORITY |
|||
) |
Attach a filter to the chain.
callable | FilterInterface | $callback | A Filter implementation or valid PHP callback |
int | $priority | Priority at which to enqueue filter; defaults to 1000 (higher executes earlier) |
Exception\InvalidArgumentException |
attachByName | ( | $name, | |
$options = [] , |
|||
$priority = self::DEFAULT_PRIORITY |
|||
) |
Attach a filter to the chain using a short name.
Retrieves the filter from the attached plugin manager, and then calls attach() with the retrieved instance.
string | $name | |
mixed | $options | |
int | $priority | Priority at which to enqueue filter; defaults to 1000 (higher executes earlier) |
count | ( | ) |
Return the count of attached filters.
filter | ( | $value | ) |
Returns $value filtered through each filter in the chain.
Filters are run in the order in which they were added to the chain (FIFO)
mixed | $value |
Implements FilterInterface.
getFilters | ( | ) |
Get all the filters.
getPluginManager | ( | ) |
Get plugin manager instance.
merge | ( | FilterChain | $filterChain | ) |
Merge the filter chain with the one given in parameter.
FilterChain | $filterChain |
plugin | ( | $name, | |
array | $options = [] |
||
) |
setOptions | ( | $options | ) |
array | Traversable | $options |
Exception\InvalidArgumentException |
setPluginManager | ( | FilterPluginManager | $plugins | ) |
|
protected |
|
protected |
const DEFAULT_PRIORITY = 1000 |
Default priority at which filters are added.