1 | <?php |
||
23 | class GenericEventDispatcher implements EventDispatcher, Subscriber { |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | private $dispatchableListeners = array(); |
||
29 | |||
30 | /** |
||
31 | * @var boolean |
||
32 | */ |
||
33 | private $throwOnMissingEvent = false; |
||
34 | |||
35 | /** |
||
36 | * @since 1.0 |
||
37 | * |
||
38 | * {@inheritDoc} |
||
39 | * |
||
40 | * @throws RuntimeException |
||
41 | */ |
||
42 | 4 | public function addListenerCollection( EventListenerCollection $listenerCollection ) { |
|
56 | |||
57 | /** |
||
58 | * @since 1.0 |
||
59 | * |
||
60 | * {@inheritDoc} |
||
61 | * |
||
62 | * @throws InvalidArgumentException |
||
63 | */ |
||
64 | 12 | public function addListener( $event, EventListener $listener ) { |
|
78 | |||
79 | /** |
||
80 | * @since 1.0 |
||
81 | * |
||
82 | * {@inheritDoc} |
||
83 | */ |
||
84 | 3 | public function removeListener( $event, EventListener $listener = null ) { |
|
104 | |||
105 | /** |
||
106 | * @since 1.1 |
||
107 | * |
||
108 | * @param boolean $throwOnMissingEvent |
||
109 | */ |
||
110 | 1 | public function throwOnMissingEvent( $throwOnMissingEvent ) { |
|
113 | |||
114 | /** |
||
115 | * @since 1.0 |
||
116 | * |
||
117 | * {@inheritDoc} |
||
118 | */ |
||
119 | 12 | public function hasEvent( $event ) { |
|
122 | |||
123 | /** |
||
124 | * @since 1.0 |
||
125 | * |
||
126 | * {@inheritDoc} |
||
127 | */ |
||
128 | 8 | public function dispatch( $event, $dispatchContext = null ) { |
|
151 | |||
152 | } |
||
153 |