1 | <?php |
||
11 | class ListenerCollection implements \IteratorAggregate, \Countable |
||
12 | { |
||
13 | /** |
||
14 | * @var ListenerInterface[] |
||
15 | */ |
||
16 | private $listeners = []; |
||
17 | |||
18 | /** |
||
19 | * @param ListenerInterface[] $listeners |
||
20 | */ |
||
21 | public function __construct(array $listeners = []) |
||
27 | |||
28 | /** |
||
29 | * @return ListenerInterface[] |
||
30 | */ |
||
31 | public function getIterator() |
||
35 | |||
36 | /** |
||
37 | * @param ListenerInterface $listener |
||
38 | */ |
||
39 | public function add(ListenerInterface $listener) |
||
43 | |||
44 | /** |
||
45 | * @return int |
||
46 | */ |
||
47 | public function count() |
||
51 | } |
||
52 |