1 | <?php |
||
17 | class EmitterImpl implements Emitter |
||
18 | { |
||
19 | /** @var bool */ |
||
20 | private $enabled = true; |
||
21 | |||
22 | /** @var \SplObjectStorage[] */ |
||
23 | private $bindings = []; |
||
24 | |||
25 | /** |
||
26 | * @param bool $enabled |
||
27 | */ |
||
28 | 1 | public function enable($enabled = true) |
|
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | 5 | public function bind($eventName, $handler) |
|
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 4 | public function emit(Event $event) |
|
73 | |||
74 | /** |
||
75 | * @param Listener|UnaryFunction|callable $listener |
||
76 | * |
||
77 | * @return bool |
||
78 | */ |
||
79 | 5 | public static function isListener($listener) |
|
85 | } |
||
86 |