Class FilterChain

Summary

Fully Qualified Name: Zend\EventManager\FilterChain
Implements: FilterInterface

Description

FilterChain: intercepting filter manager

Methods

Name Description Defined By
__construct() Constructor FilterChain
attach() Connect a filter to the chain FilterChain
clearFilters() Clear all filters FilterChain
detach() Detach a filter from the chain FilterChain
getFilters() Retrieve all filters FilterChain
getResponses() Return current responses FilterChain
run() Apply the filters FilterChain

Method Details

__construct()

Constructor

Initializes Filter\FilterIterator in which filters will be aggregated

Returns:

attach()

Connect a filter to the chain

Parameter Name Type Description
$callback callable PHP
$priority int Priority

Returns: \CallbackHandler (to allow later unsubscribe)

clearFilters()

Clear all filters

Returns: void

detach()

Detach a filter from the chain

Parameter Name Type Description
$filter callable

Returns: bool Returns true if filter found and unsubscribed; returns false otherwise

getFilters()

Retrieve all filters

Returns: \Filter\FilterIterator

getResponses()

Return current responses

Only available while the chain is still being iterated. Returns the current ResponseCollection.

Returns: null|\ResponseCollection

run()

Apply the filters

Begins iteration of the filters.

Parameter Name Type Description
$context mixed Object
$argv mixed Associative

Returns: mixed

Top