File indexing completed on 2024-12-22 05:36:37

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 /**
0022  * Representation of an event
0023  *
0024  * @category   Zend
0025  * @package    Zend_EventManager
0026  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0027  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0028  */
0029 interface Zend_EventManager_EventDescription
0030 {
0031     /**
0032      * Get event name
0033      * 
0034      * @return string
0035      */
0036     public function getName();
0037 
0038     /**
0039      * Get target/context from which event was triggered
0040      * 
0041      * @return null|string|object
0042      */
0043     public function getTarget();
0044 
0045     /**
0046      * Get parameters passed to the event
0047      * 
0048      * @return array|ArrayAccess
0049      */
0050     public function getParams();
0051 
0052     /**
0053      * Get a single parameter by name
0054      * 
0055      * @param  string $name 
0056      * @param  mixed $default Default value to return if parameter does not exist
0057      * @return mixed
0058      */
0059     public function getParam($name, $default = null);
0060 
0061     /**
0062      * Set the event name
0063      * 
0064      * @param  string $name 
0065      * @return void
0066      */
0067     public function setName($name);
0068 
0069     /**
0070      * Set the event target/context
0071      * 
0072      * @param  null|string|object $target 
0073      * @return void
0074      */
0075     public function setTarget($target);
0076 
0077     /**
0078      * Set event parameters
0079      * 
0080      * @param  string $params 
0081      * @return void
0082      */
0083     public function setParams($params);
0084 
0085     /**
0086      * Set a single parameter by key
0087      * 
0088      * @param  string $name 
0089      * @param  mixed $value 
0090      * @return void
0091      */
0092     public function setParam($name, $value);
0093 
0094     /**
0095      * Indicate whether or not the parent EventCollection should stop propagating events
0096      * 
0097      * @param  bool $flag 
0098      * @return void
0099      */
0100     public function stopPropagation($flag = true);
0101 
0102     /**
0103      * Has this event indicated event propagation should stop?
0104      * 
0105      * @return bool
0106      */
0107     public function propagationIsStopped();
0108 }