EventManager/FilterChain.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_EventManager  

\Zend_EventManager_FilterChain

Package: Zend\EventManager

FilterChain: intercepting filter manager

Implements
\Zend_EventManager_Filter
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotected\Zend_EventManager_Filter_FilterIterator $filters =

<p>All filters</p>

Methods

methodpublic__construct() : void

Constructor

Initializes Zend_EventManager_Filter_FilterIterator in which filters will be aggregated

methodpublicattach(callback $callback, int $priority = 1) : \Zend_Stdlib_CallbackHandler

Connect a filter to the chain

Parameters
Name Type Description
$callback callback

PHP Callback

$priority int

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

Returns
Type Description
\Zend_Stdlib_CallbackHandler (to allow later unsubscribe)
methodpublicclearFilters() : void

Clear all filters

methodpublicdetach(\Zend_Stdlib_CallbackHandler $filter) : bool

Detach a filter from the chain

Parameters
Name Type Description
$filter \Zend_Stdlib_CallbackHandler
Returns
Type Description
bool Returns true if filter found and unsubscribed; returns false otherwise
methodpublicgetFilters() : \Zend_EventManager_Filter_FilterIterator

Retrieve all filters

Returns
Type Description
\Zend_EventManager_Filter_FilterIterator
methodpublicgetResponses() : null | \Zend_EventManager_ResponseCollection

Return current responses

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

Returns
Type Description
null | \Zend_EventManager_ResponseCollection
methodpublicrun(mixed $context, mixed $argv = array()) : mixed

Apply the filters

Begins iteration of the filters.

Parameters
Name Type Description
$context mixed

Object under observation

$argv mixed

Associative array of arguments

Returns
Type Description
mixed
Documentation was generated by phpDocumentor 2.0.0a8.