| 1 | <?php |
||
| 23 | trait EventBehaviour |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var Event[] |
||
| 27 | */ |
||
| 28 | private $recordedEvents = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Record event. |
||
| 32 | * |
||
| 33 | * @param Event $event |
||
| 34 | */ |
||
| 35 | final protected function recordEvent(Event $event): void |
||
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritdoc} |
||
| 42 | */ |
||
| 43 | final public function getRecordedEvents(): EventCollection |
||
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | final public function clearRecordedEvents(): void |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritdoc} |
||
| 58 | */ |
||
| 59 | final public function collectRecordedEvents(): EventCollection |
||
| 67 | } |
||
| 68 |