Fully Qualified Name: | Zend\Filter\FilterChain |
Extends: | AbstractFilter |
Implements: | Countable |
Name | Description | Defined By |
---|---|---|
__clone() | Clone filters | FilterChain |
__construct() | Initialize filter chain | FilterChain |
__invoke() | Invoke filter as a command | AbstractFilter |
__sleep() | Prepare filter chain for serialization | FilterChain |
attach() | Attach a filter to the chain | FilterChain |
attachByName() | Attach a filter to the chain using a short name | FilterChain |
count() | Return the count of attached filters | FilterChain |
filter() | Returns $value filtered through each filter in the chain | FilterChain |
getFilters() | Get all the filters | FilterChain |
getOptions() | Retrieve options representing object state | AbstractFilter |
getPluginManager() | Get plugin manager instance | FilterChain |
hasPcreUnicodeSupport() | AbstractFilter | |
merge() | Merge the filter chain with the one given in parameter | FilterChain |
plugin() | Retrieve a filter plugin by name | FilterChain |
setOptions() | FilterChain | |
setPluginManager() | Set plugin manager instance | FilterChain |
Clone filters
Returns:
Initialize filter chain
Parameter Name | Type | Description |
---|---|---|
$options | null|array|\Traversable |
Returns:
Invoke filter as a command
Proxies to {@link filter()}
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: mixed
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).
Returns:
Attach a filter to the chain
Parameter Name | Type | Description |
---|---|---|
$callback | callable|\FilterInterface | A |
$priority | int | Priority |
Returns: self
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.
Parameter Name | Type | Description |
---|---|---|
$name | string | |
$options | mixed | |
$priority | int | Priority |
Returns: self
Return the count of attached filters
Returns: int
Returns $value filtered through each filter in the chain
Filters are run in the order in which they were added to the chain (FIFO)
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: mixed
Get all the filters
Returns: \PriorityQueue
Retrieve options representing object state
Returns: array
Get plugin manager instance
Returns: \FilterPluginManager
Returns: bool
Merge the filter chain with the one given in parameter
Parameter Name | Type | Description |
---|---|---|
$filterChain | \FilterChain |
Returns: self
Retrieve a filter plugin by name
Parameter Name | Type | Description |
---|---|---|
$name | mixed | |
$options | array |
Returns: \FilterInterface
Parameter Name | Type | Description |
---|---|---|
$options | array|\Traversable |
Returns: self
Set plugin manager instance
Parameter Name | Type | Description |
---|---|---|
$plugins | \FilterPluginManager |
Returns: self