1 | <?php |
||
41 | class EventDispatcher extends EventManager implements SharedManagerInterface, ListenerAwareInterface, CountableInterface |
||
42 | { |
||
43 | use CountableTrait, |
||
44 | NameGlobbingTrait, |
||
45 | SharedManagerTrait, |
||
46 | ListenerAwareTrait; |
||
47 | |||
48 | /** |
||
49 | * event prototype |
||
50 | * |
||
51 | * @var EventInterface|null |
||
52 | * @access protected |
||
53 | */ |
||
54 | protected $event_proto; |
||
55 | |||
56 | /** |
||
57 | * Create a event manager with defined scopes |
||
58 | * |
||
59 | * @param string|array $scopes |
||
60 | * @param EventInterface $event_proto event prototype if any |
||
61 | * @access public |
||
62 | */ |
||
63 | public function __construct( |
||
75 | |||
76 | /** |
||
77 | * Override `newEvent()` in EventManager. |
||
78 | * |
||
79 | * Added event prototype support |
||
80 | * |
||
81 | * {@inheritDoc} |
||
82 | */ |
||
83 | protected function newEvent( |
||
97 | |||
98 | /** |
||
99 | * Override `getMatchedQueue()` in EventManager. |
||
100 | * |
||
101 | * Support for shared manager & name globbing |
||
102 | * |
||
103 | * {@inheritDoc} |
||
104 | */ |
||
105 | protected function getMatchedQueue( |
||
121 | |||
122 | /** |
||
123 | * Get all event names of $this manager |
||
124 | * |
||
125 | * @return array |
||
126 | * @access protected |
||
127 | */ |
||
128 | protected function getEventNames()/*# : array */ |
||
132 | |||
133 | /** |
||
134 | * Get a merged queue in $this manager for the given event name |
||
135 | * |
||
136 | * @param string $eventName |
||
137 | * @return EventQueueInterface |
||
138 | * @access protected |
||
139 | */ |
||
140 | protected function matchEventQueues( |
||
152 | } |
||
153 |