| 1 | <?php |
||
| 18 | final class EventArrayCollection implements EventCollection |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var Event[] |
||
| 22 | */ |
||
| 23 | private $events = []; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * EventArrayCollection constructor. |
||
| 27 | * |
||
| 28 | * @param (Event|mixed)[] $events |
||
| 29 | * |
||
| 30 | * @throws InvalidEventException |
||
| 31 | */ |
||
| 32 | public function __construct(array $events) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | * |
||
| 50 | * @return Event |
||
| 51 | */ |
||
| 52 | public function current(): Event |
||
| 56 | |||
| 57 | /** |
||
| 58 | * {@inheritdoc} |
||
| 59 | */ |
||
| 60 | public function next(): void |
||
| 64 | |||
| 65 | /** |
||
| 66 | * {@inheritdoc} |
||
| 67 | * |
||
| 68 | * @return string|int|null |
||
| 69 | */ |
||
| 70 | public function key() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * {@inheritdoc} |
||
| 77 | */ |
||
| 78 | public function valid(): bool |
||
| 82 | |||
| 83 | /** |
||
| 84 | * {@inheritdoc} |
||
| 85 | */ |
||
| 86 | public function rewind(): void |
||
| 90 | |||
| 91 | /** |
||
| 92 | * {@inheritdoc} |
||
| 93 | */ |
||
| 94 | public function count(): int |
||
| 98 | } |
||
| 99 |