Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (16 sloc) 315 Bytes
<?php
namespace app\entities;
trait EventTrait
{
private $events = [];
protected function recordEvent($event): void
{
$this->events[] = $event;
}
public function releaseEvents(): array
{
$events = $this->events;
$this->events = [];
return $events;
}
}
You can’t perform that action at this time.