FilterChain: intercepting filter manager

category Zend
package Zend_EventManager

 Methods

Constructor

__construct() 

Initializes Filter\FilterIterator in which filters will be aggregated

Connect a filter to the chain

attach(\Zend\EventManager\callable $callback, int $priority) : \Zend\Stdlib\CallbackHandler

Parameters

$callback

\Zend\EventManager\callable

PHP Callback

$priority

int

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

Detach a filter from the chain

detach(\Zend\Stdlib\CallbackHandler $filter) : bool

Parameters

Returns

boolReturns true if filter found and unsubscribed; returns false otherwise

Return current responses

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

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

Returns

Apply the filters

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

Begins iteration of the filters.

Parameters

$context

mixed

Object under observation

$argv

mixed

Associative array of arguments

Returns

mixed

 Properties

 

<p>All filters</p>

$filters : \Zend\EventManager\Filter\FilterIterator