FilterChain: intercepting filter manager

package Default

 Methods

Constructor

__construct() 

Initializes Filter\FilterIterator in which filters will be aggregated

Connect a filter to the chain

attach(callable $callback, integer $priority = 1) : \Zend\Stdlib\CallbackHandler
inherited_from \Zend\EventManager\Filter\FilterInterface::attach()

Parameters

$callback

callable

PHP Callback

$priority

integer

Priority in the queue at which to execute; defaults to 1 (higher numbers == higher priority)

Exceptions

\Zend\EventManager\Exception\InvalidCallbackException

Returns

\Zend\Stdlib\CallbackHandler(to allow later unsubscribe)

Clear all filters

clearFilters() : void
inherited_from \Zend\EventManager\Filter\FilterInterface::clearFilters()

Detach a filter from the chain

detach(\Zend\Stdlib\CallbackHandler $filter) : boolean
inherited_from \Zend\EventManager\Filter\FilterInterface::detach()

Parameters

$filter

\Zend\Stdlib\CallbackHandler

Returns

booleanReturns true if filter found and unsubscribed; returns false otherwise

Retrieve all filters

getFilters() : \Zend\EventManager\Filter\FilterIterator
inherited_from \Zend\EventManager\Filter\FilterInterface::getFilters()

Returns

\Zend\EventManager\Filter\FilterIterator

Return current responses

getResponses() : null | \Zend\EventManager\ResponseCollection

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

inherited_from \Zend\EventManager\Filter\FilterInterface::getResponses()

Returns

null\Zend\EventManager\ResponseCollection

Apply the filters

run(mixed $context, mixed $argv = array()) : mixed

Begins iteration of the filters.

inherited_from \Zend\EventManager\Filter\FilterInterface::run()

Parameters

$context

mixed

Object under observation

$argv

mixed

Associative array of arguments

Returns

mixed

 Properties

 

All filters

$filters : \Zend\EventManager\Filter\FilterIterator

Default