diff options
author | Joas Schilling <coding@schilljs.com> | 2020-02-27 11:01:29 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-02-27 11:04:23 +0100 |
commit | 3ffed429256a1634d0103188ddb5e211616cc355 (patch) | |
tree | dbb7fbb58b2afc46b6de80bf3b4894a135cac79a /lib/public/EventDispatcher/IEventDispatcher.php | |
parent | 0cf76aa2e8a66cd9b772be462fbb9b6633f32b32 (diff) | |
download | nextcloud-server-3ffed429256a1634d0103188ddb5e211616cc355.tar.gz nextcloud-server-3ffed429256a1634d0103188ddb5e211616cc355.zip |
Allow to remove listeners
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/EventDispatcher/IEventDispatcher.php')
-rw-r--r-- | lib/public/EventDispatcher/IEventDispatcher.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public/EventDispatcher/IEventDispatcher.php b/lib/public/EventDispatcher/IEventDispatcher.php index e8b63e6f03c..e6e1bc5ce61 100644 --- a/lib/public/EventDispatcher/IEventDispatcher.php +++ b/lib/public/EventDispatcher/IEventDispatcher.php @@ -43,6 +43,14 @@ interface IEventDispatcher { public function addListener(string $eventName, callable $listener, int $priority = 0): void; /** + * @param string $eventName preferably the fully-qualified class name of the Event sub class + * @param callable $listener the object that is invoked when a matching event is dispatched + * + * @since 19.0.0 + */ + public function removeListener(string $eventName, callable $listener): void; + + /** * @param string $eventName preferably the fully-qualified class name of the Event sub class to listen for * @param string $className fully qualified class name (or ::class notation) of a \OCP\EventDispatcher\IEventListener that can be built by the DI container * @param int $priority |