web/lib/Zend/EventManager/EventDescription.php
changeset 808 6b6c2214f778
child 1230 68c69c656a2c
equal deleted inserted replaced
807:877f952ae2bd 808:6b6c2214f778
       
     1 <?php
       
     2 /**
       
     3  * Zend Framework
       
     4  *
       
     5  * LICENSE
       
     6  *
       
     7  * This source file is subject to the new BSD license that is bundled
       
     8  * with this package in the file LICENSE.txt.
       
     9  * It is also available through the world-wide-web at this URL:
       
    10  * http://framework.zend.com/license/new-bsd
       
    11  * If you did not receive a copy of the license and are unable to
       
    12  * obtain it through the world-wide-web, please send an email
       
    13  * to license@zend.com so we can send you a copy immediately.
       
    14  *
       
    15  * @category   Zend
       
    16  * @package    Zend_EventManager
       
    17  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
       
    18  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    19  */
       
    20 
       
    21 /**
       
    22  * Representation of an event
       
    23  *
       
    24  * @category   Zend
       
    25  * @package    Zend_EventManager
       
    26  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
       
    27  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    28  */
       
    29 interface Zend_EventManager_EventDescription
       
    30 {
       
    31     /**
       
    32      * Get event name
       
    33      * 
       
    34      * @return string
       
    35      */
       
    36     public function getName();
       
    37 
       
    38     /**
       
    39      * Get target/context from which event was triggered
       
    40      * 
       
    41      * @return null|string|object
       
    42      */
       
    43     public function getTarget();
       
    44 
       
    45     /**
       
    46      * Get parameters passed to the event
       
    47      * 
       
    48      * @return array|ArrayAccess
       
    49      */
       
    50     public function getParams();
       
    51 
       
    52     /**
       
    53      * Get a single parameter by name
       
    54      * 
       
    55      * @param  string $name 
       
    56      * @param  mixed $default Default value to return if parameter does not exist
       
    57      * @return mixed
       
    58      */
       
    59     public function getParam($name, $default = null);
       
    60 
       
    61     /**
       
    62      * Set the event name
       
    63      * 
       
    64      * @param  string $name 
       
    65      * @return void
       
    66      */
       
    67     public function setName($name);
       
    68 
       
    69     /**
       
    70      * Set the event target/context
       
    71      * 
       
    72      * @param  null|string|object $target 
       
    73      * @return void
       
    74      */
       
    75     public function setTarget($target);
       
    76 
       
    77     /**
       
    78      * Set event parameters
       
    79      * 
       
    80      * @param  string $params 
       
    81      * @return void
       
    82      */
       
    83     public function setParams($params);
       
    84 
       
    85     /**
       
    86      * Set a single parameter by key
       
    87      * 
       
    88      * @param  string $name 
       
    89      * @param  mixed $value 
       
    90      * @return void
       
    91      */
       
    92     public function setParam($name, $value);
       
    93 
       
    94     /**
       
    95      * Indicate whether or not the parent EventCollection should stop propagating events
       
    96      * 
       
    97      * @param  bool $flag 
       
    98      * @return void
       
    99      */
       
   100     public function stopPropagation($flag = true);
       
   101 
       
   102     /**
       
   103      * Has this event indicated event propagation should stop?
       
   104      * 
       
   105      * @return bool
       
   106      */
       
   107     public function propagationIsStopped();
       
   108 }