From b07ff57b2b407e6d74f2fa9b71572f39a6495ff8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 15 Jan 2021 08:32:09 +0100 Subject: [PATCH] Add a hint about the direction of priority Signed-off-by: Joas Schilling --- lib/public/AppFramework/Bootstrap/IRegistrationContext.php | 3 ++- lib/public/EventDispatcher/IEventDispatcher.php | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php index 7d4692f3fcc4d..65c34c71fd06f 100644 --- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php +++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php @@ -118,7 +118,8 @@ public function registerParameter(string $name, $value): void; * @psalm-param string|class-string $event preferably the fully-qualified class name of the Event sub class to listen for * @param string $listener fully qualified class name (or ::class notation) of a \OCP\EventDispatcher\IEventListener that can be built by the DI container * @psalm-param class-string<\OCP\EventDispatcher\IEventListener> $listener fully qualified class name that can be built by the DI container - * @param int $priority + * @param int $priority The higher this value, the earlier an event + * listener will be triggered in the chain (defaults to 0) * * @see IEventDispatcher::addServiceListener() * diff --git a/lib/public/EventDispatcher/IEventDispatcher.php b/lib/public/EventDispatcher/IEventDispatcher.php index 9f9bd2ebd18f3..bc45769d5cc9d 100644 --- a/lib/public/EventDispatcher/IEventDispatcher.php +++ b/lib/public/EventDispatcher/IEventDispatcher.php @@ -40,7 +40,8 @@ interface IEventDispatcher { * @psalm-param string|class-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 * @psalm-param callable(T):void $listener - * @param int $priority + * @param int $priority The higher this value, the earlier an event + * listener will be triggered in the chain (defaults to 0) * * @since 17.0.0 */ @@ -63,7 +64,8 @@ public function removeListener(string $eventName, callable $listener): void; * @psalm-param string|class-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 * @psalm-param class-string<\OCP\EventDispatcher\IEventListener> $className fully qualified class name that can be built by the DI container - * @param int $priority + * @param int $priority The higher this value, the earlier an event + * listener will be triggered in the chain (defaults to 0) * * @since 17.0.0 */