/var/www/vhosts/ihelp.ro/httpdocs/vendor/mirko-pagliai/php-tools/src/Event
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/mirko-pagliai/php-tools/src/Event/EventDispatcher.php (1636B)
EventList = new EventList();
}
/**
* Dispatches an event
* @param \Tools\Event\Event $event An `Event` instance
* @param string|null $eventName Name of the event
* @return object The `Event` that was dispatched
* @noinspection PhpDocSignatureInspection
*/
public function dispatch(object $event, ?string $eventName = null): object
{
$this->getEventList()->add($event);
return parent::dispatch($event, $eventName);
}
/**
* Gets the `EventList` instance for this dispatcher
* @return \Tools\Event\EventList
*/
public function getEventList(): EventList
{
return $this->EventList;
}
}