1 | <?php |
||
34 | class EventManager extends ObjectAbstract implements EventManagerInterface |
||
35 | { |
||
36 | /** |
||
37 | * Events managing |
||
38 | * |
||
39 | * @var EventQueueInterface[] |
||
40 | * @access protected |
||
41 | */ |
||
42 | protected $events = []; |
||
43 | |||
44 | /** |
||
45 | * {@inheritDoc} |
||
46 | */ |
||
47 | public function on( |
||
59 | |||
60 | /** |
||
61 | * {@inheritDoc} |
||
62 | */ |
||
63 | public function off( |
||
85 | |||
86 | /** |
||
87 | * {@inheritDoc} |
||
88 | */ |
||
89 | public function trigger($event, $context = null, array $properties = []) |
||
110 | |||
111 | /** |
||
112 | * Has $eventName been defined ? |
||
113 | * |
||
114 | * @param string $eventName |
||
115 | * @return bool |
||
116 | * @access protected |
||
117 | */ |
||
118 | protected function hasEventQueue(/*# string */ $eventName)/*# : bool */ |
||
122 | |||
123 | /** |
||
124 | * Create a new event |
||
125 | * |
||
126 | * @param string|EventInterface $eventName |
||
127 | * @param object|string|null $context |
||
128 | * @param array $properties |
||
129 | * @return EventInterface |
||
130 | * @access protected |
||
131 | */ |
||
132 | protected function newEvent( |
||
143 | |||
144 | /** |
||
145 | * Get a new event queue |
||
146 | * |
||
147 | * @return EventQueueInterface |
||
148 | * @access protected |
||
149 | */ |
||
150 | protected function newEventQueue()/*# : EventQueueInterface */ |
||
154 | |||
155 | /** |
||
156 | * Get related event handler queue for this $eventName |
||
157 | * |
||
158 | * @param string $eventName |
||
159 | * @return EventQueueInterface |
||
160 | * @access protected |
||
161 | */ |
||
162 | protected function getMatchedQueue( |
||
171 | } |
||
172 |