diff options
Diffstat (limited to 'lib/private/EventDispatcher/EventDispatcher.php')
-rw-r--r-- | lib/private/EventDispatcher/EventDispatcher.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/EventDispatcher/EventDispatcher.php b/lib/private/EventDispatcher/EventDispatcher.php index bbf6ae2b368..8830bae79d8 100644 --- a/lib/private/EventDispatcher/EventDispatcher.php +++ b/lib/private/EventDispatcher/EventDispatcher.php @@ -31,6 +31,7 @@ use OCP\IContainer; use OCP\ILogger; use OCP\IServerContainer; use Symfony\Component\EventDispatcher\EventDispatcher as SymfonyDispatcher; +use function get_class; class EventDispatcher implements IEventDispatcher { @@ -74,6 +75,10 @@ class EventDispatcher implements IEventDispatcher { $this->dispatcher->dispatch($event, $eventName); } + public function dispatchTyped(Event $event): void { + $this->dispatch(get_class($event), $event); + } + /** * @return SymfonyDispatcher */ |