Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
EventManagerInterface.php
001 <?php
002 /**
003 * Zend Framework (http://framework.zend.com/)
004 *
005 * @link http://github.com/zendframework/zf2 for the canonical source repository
006 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
007 * @license http://framework.zend.com/license/new-bsd New BSD License
008 */
009
010 namespace Zend\EventManager;
011
012 use Traversable;
013 use Zend\Stdlib\CallbackHandler;
014
015 /**
016 * Interface for messengers
017 */
018 interface EventManagerInterface extends SharedEventManagerAwareInterface
019 {
020 /**
021 * Trigger an event
022 *
023 * Should allow handling the following scenarios:
024 * - Passing Event object only
025 * - Passing event name and Event object only
026 * - Passing event name, target, and Event object
027 * - Passing event name, target, and array|ArrayAccess of arguments
028 * - Passing event name, target, array|ArrayAccess of arguments, and callback
029 *
030 * @param string|EventInterface $event
031 * @param object|string $target
032 * @param array|object $argv
033 * @param null|callable $callback
034 * @return ResponseCollection
035 */
036 public function trigger($event, $target = null, $argv = array(), $callback = null);
037
038 /**
039 * Trigger an event until the given callback returns a boolean true
040 *
041 * Should allow handling the following scenarios:
042 * - Passing Event object and callback only
043 * - Passing event name, Event object, and callback only
044 * - Passing event name, target, Event object, and callback
045 * - Passing event name, target, array|ArrayAccess of arguments, and callback
046 *
047 * @param string|EventInterface $event
048 * @param object|string $target
049 * @param array|object $argv
050 * @param callable $callback
051 * @return ResponseCollection
052 * @deprecated Please use trigger()
053 */
054 public function triggerUntil($event, $target, $argv = null, $callback = null);
055
056 /**
057 * Attach a listener to an event
058 *
059 * @param string $event
060 * @param callable $callback
061 * @param int $priority Priority at which to register listener
062 * @return CallbackHandler
063 */
064 public function attach($event, $callback = null, $priority = 1);
065
066 /**
067 * Detach an event listener
068 *
069 * @param CallbackHandler|ListenerAggregateInterface $listener
070 * @return bool
071 */
072 public function detach($listener);
073
074 /**
075 * Get a list of events for which this collection has listeners
076 *
077 * @return array
078 */
079 public function getEvents();
080
081 /**
082 * Retrieve a list of listeners registered to a given event
083 *
084 * @param string $event
085 * @return array|object
086 */
087 public function getListeners($event);
088
089 /**
090 * Clear all listeners for a given event
091 *
092 * @param string $event
093 * @return void
094 */
095 public function clearListeners($event);
096
097 /**
098 * Set the event class to utilize
099 *
100 * @param string $class
101 * @return EventManagerInterface
102 */
103 public function setEventClass($class);
104
105 /**
106 * Get the identifier(s) for this EventManager
107 *
108 * @return array
109 */
110 public function getIdentifiers();
111
112 /**
113 * Set the identifiers (overrides any currently set identifiers)
114 *
115 * @param string|int|array|Traversable $identifiers
116 * @return EventManagerInterface
117 */
118 public function setIdentifiers($identifiers);
119
120 /**
121 * Add some identifier(s) (appends to any currently set identifiers)
122 *
123 * @param string|int|array|Traversable $identifiers
124 * @return EventManagerInterface
125 */
126 public function addIdentifiers($identifiers);
127
128 /**
129 * Attach a listener aggregate
130 *
131 * @param ListenerAggregateInterface $aggregate
132 * @param int $priority If provided, a suggested priority for the aggregate to use
133 * @return mixed return value of {@link ListenerAggregateInterface::attach()}
134 */
135 public function attachAggregate(ListenerAggregateInterface $aggregate, $priority = 1);
136
137 /**
138 * Detach a listener aggregate
139 *
140 * @param ListenerAggregateInterface $aggregate
141 * @return mixed return value of {@link ListenerAggregateInterface::detach()}
142 */
143 public function detachAggregate(ListenerAggregateInterface $aggregate);
144 }
145