| 1 | <?php |
||
| 11 | trait EventAwareTrait |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var EventInterface[] |
||
| 15 | */ |
||
| 16 | private $events = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Registers that $event occurred |
||
| 20 | * @param EventInterface $event |
||
| 21 | */ |
||
| 22 | public function recordThat(EventInterface $event): void |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return EventInterface[] of occurred events |
||
| 29 | */ |
||
| 30 | public function releaseEvents(): array |
||
| 37 | } |
||
| 38 |