File indexing completed on 2024-05-12 06:02:28

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_EventManager
0017  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0018  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0019  */
0020 
0021 // require_once 'Zend/Stdlib/CallbackHandler.php';
0022 
0023 /**
0024  * Interface for intercepting filter chains
0025  *
0026  * @category   Zend
0027  * @package    Zend_EventManager
0028  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0029  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0030  */
0031 interface Zend_EventManager_Filter
0032 {
0033     /**
0034      * Execute the filter chain
0035      * 
0036      * @param  string|object $context 
0037      * @param  array $params 
0038      * @return mixed
0039      */
0040     public function run($context, array $params = array());
0041 
0042     /**
0043      * Attach an intercepting filter
0044      * 
0045      * @param  callback $callback 
0046      * @return Zend_Stdlib_CallbackHandler
0047      */
0048     public function attach($callback);
0049 
0050     /**
0051      * Detach an intercepting filter
0052      * 
0053      * @param  Zend_Stdlib_CallbackHandler $filter 
0054      * @return bool
0055      */
0056     public function detach(Zend_Stdlib_CallbackHandler $filter);
0057 
0058     /**
0059      * Get all intercepting filters
0060      * 
0061      * @return array
0062      */
0063     public function getFilters();
0064 
0065     /**
0066      * Clear all filters
0067      * 
0068      * @return void
0069      */
0070     public function clearFilters();
0071 
0072     /**
0073      * Get all filter responses
0074      * 
0075      * @return Zend_EventManager_ResponseCollection
0076      */
0077     public function getResponses();
0078 }