diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2024-02-14 14:02:20 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2024-02-14 14:02:28 -0100 |
commit | 2232753b994dfb65ae46f07f827b89858faea4db (patch) | |
tree | 9d046912c9866893e9cfb8bd66f769fafc55b850 /lib/public/EventDispatcher | |
parent | 9a299ed60beca9318c30782a470ae97293b569e1 (diff) | |
download | nextcloud-server-2232753b994dfb65ae46f07f827b89858faea4db.tar.gz nextcloud-server-2232753b994dfb65ae46f07f827b89858faea4db.zip |
add hasListeners()
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/public/EventDispatcher')
-rw-r--r-- | lib/public/EventDispatcher/IEventDispatcher.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/public/EventDispatcher/IEventDispatcher.php b/lib/public/EventDispatcher/IEventDispatcher.php index 0a96fa799d4..a84e0fe2f3b 100644 --- a/lib/public/EventDispatcher/IEventDispatcher.php +++ b/lib/public/EventDispatcher/IEventDispatcher.php @@ -71,6 +71,15 @@ interface IEventDispatcher { /** * @template T of \OCP\EventDispatcher\Event + * @param string $eventName preferably the fully-qualified class name of the Event sub class + * + * @return bool TRUE if event has registered listeners + * @since 29.0.0 + */ + public function hasListeners(string $eventName): bool; + + /** + * @template T of \OCP\EventDispatcher\Event * @param string $eventName * @psalm-param string|class-string<T> $eventName * @param Event $event |