Skip to content

Commit ac14e42

Browse files
authored
Merge pull request #25143 from nextcloud/backport/25141/stable20
[stable20] Add a hint about the direction of priority
2 parents 48eea6f + b07ff57 commit ac14e42

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

lib/public/AppFramework/Bootstrap/IRegistrationContext.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ public function registerParameter(string $name, $value): void;
118118
* @psalm-param string|class-string<T> $event preferably the fully-qualified class name of the Event sub class to listen for
119119
* @param string $listener fully qualified class name (or ::class notation) of a \OCP\EventDispatcher\IEventListener that can be built by the DI container
120120
* @psalm-param class-string<\OCP\EventDispatcher\IEventListener<T>> $listener fully qualified class name that can be built by the DI container
121-
* @param int $priority
121+
* @param int $priority The higher this value, the earlier an event
122+
* listener will be triggered in the chain (defaults to 0)
122123
*
123124
* @see IEventDispatcher::addServiceListener()
124125
*

lib/public/EventDispatcher/IEventDispatcher.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ interface IEventDispatcher {
4040
* @psalm-param string|class-string<T> $eventName preferably the fully-qualified class name of the Event sub class
4141
* @param callable $listener the object that is invoked when a matching event is dispatched
4242
* @psalm-param callable(T):void $listener
43-
* @param int $priority
43+
* @param int $priority The higher this value, the earlier an event
44+
* listener will be triggered in the chain (defaults to 0)
4445
*
4546
* @since 17.0.0
4647
*/
@@ -63,7 +64,8 @@ public function removeListener(string $eventName, callable $listener): void;
6364
* @psalm-param string|class-string<T> $eventName preferably the fully-qualified class name of the Event sub class to listen for
6465
* @param string $className fully qualified class name (or ::class notation) of a \OCP\EventDispatcher\IEventListener that can be built by the DI container
6566
* @psalm-param class-string<\OCP\EventDispatcher\IEventListener<T>> $className fully qualified class name that can be built by the DI container
66-
* @param int $priority
67+
* @param int $priority The higher this value, the earlier an event
68+
* listener will be triggered in the chain (defaults to 0)
6769
*
6870
* @since 17.0.0
6971
*/

0 commit comments

Comments
 (0)