CodeExplorer getEmptyInstance example
public function dispatchEvent($eventName, EventArgs
$eventArgs = null
): void
{ if (!
$this->initializedSubscribers
) { $this->
initializeSubscribers();
} if (!
isset($this->listeners
[$eventName])) { return;
} $eventArgs ??= EventArgs::
getEmptyInstance();
if (!
isset($this->initialized
[$eventName])) { $this->
initializeListeners($eventName);
} foreach ($this->listeners
[$eventName] as $hash =>
$listener) { $listener->
{$this->methods
[$eventName][$hash]}($eventArgs);
} } public function getListeners($event = null
): array
{