aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/EventDispatcher/IEventListener.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/EventDispatcher/IEventListener.php')
-rw-r--r--lib/public/EventDispatcher/IEventListener.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/public/EventDispatcher/IEventListener.php b/lib/public/EventDispatcher/IEventListener.php
new file mode 100644
index 00000000000..46ed53fa7a2
--- /dev/null
+++ b/lib/public/EventDispatcher/IEventListener.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCP\EventDispatcher;
+
+/**
+ * @since 17.0.0
+ *
+ * @template T of Event
+ */
+interface IEventListener {
+ /**
+ * @param Event $event
+ * @psalm-param T $event
+ *
+ * @since 17.0.0
+ */
+ public function handle(Event $event): void;
+}