Source of file SharedEventManagerInterface.php
Size: 1,881 Bytes - Last Modified: 2014-03-12T23:21:18+01:00
/home/theseer/Downloads/ZendFramework-2.3.0/library/Zend/EventManager/SharedEventManagerInterface.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | <?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\EventManager; use Zend\Stdlib\CallbackHandler; use Zend\Stdlib\PriorityQueue; /** * Interface for shared event listener collections */ interface SharedEventManagerInterface { /** * Retrieve all listeners for a given identifier and event * * @param string|int $id * @param string|int $event * @return false|PriorityQueue */ public function getListeners($id, $event); /** * Attach a listener to an event * * @param string|array $id Identifier(s) for event emitting component(s) * @param string $event * @param callable $callback PHP Callback * @param int $priority Priority at which listener should execute * @return void */ public function attach($id, $event, $callback, $priority = 1); /** * Detach a listener from an event offered by a given resource * * @param string|int $id * @param CallbackHandler $listener * @return bool Returns true if event and listener found, and unsubscribed; returns false if either event or listener not found */ public function detach($id, CallbackHandler $listener); /** * Retrieve all registered events for a given resource * * @param string|int $id * @return array */ public function getEvents($id); /** * Clear all listeners for a given identifier, optionally for a specific event * * @param string|int $id * @param null|string $event * @return bool */ public function clearListeners($id, $event = null); } |