mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-19 21:27:50 +09:00
Update dependencies
This commit is contained in:
@@ -28,7 +28,7 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface
|
||||
* @param int $priority The higher this value, the earlier an event
|
||||
* listener will be triggered in the chain (defaults to 0)
|
||||
*/
|
||||
public function addListener(string $eventName, callable $listener, int $priority = 0);
|
||||
public function addListener(string $eventName, callable $listener, int $priority = 0): void;
|
||||
|
||||
/**
|
||||
* Adds an event subscriber.
|
||||
@@ -36,35 +36,31 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface
|
||||
* The subscriber is asked for all the events it is
|
||||
* interested in and added as a listener for these events.
|
||||
*/
|
||||
public function addSubscriber(EventSubscriberInterface $subscriber);
|
||||
public function addSubscriber(EventSubscriberInterface $subscriber): void;
|
||||
|
||||
/**
|
||||
* Removes an event listener from the specified events.
|
||||
*/
|
||||
public function removeListener(string $eventName, callable $listener);
|
||||
public function removeListener(string $eventName, callable $listener): void;
|
||||
|
||||
public function removeSubscriber(EventSubscriberInterface $subscriber);
|
||||
public function removeSubscriber(EventSubscriberInterface $subscriber): void;
|
||||
|
||||
/**
|
||||
* Gets the listeners of a specific event or all listeners sorted by descending priority.
|
||||
*
|
||||
* @return array<callable[]|callable>
|
||||
*/
|
||||
public function getListeners(string $eventName = null);
|
||||
public function getListeners(?string $eventName = null): array;
|
||||
|
||||
/**
|
||||
* Gets the listener priority for a specific event.
|
||||
*
|
||||
* Returns null if the event or the listener does not exist.
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getListenerPriority(string $eventName, callable $listener);
|
||||
public function getListenerPriority(string $eventName, callable $listener): ?int;
|
||||
|
||||
/**
|
||||
* Checks whether an event has any registered listeners.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasListeners(string $eventName = null);
|
||||
public function hasListeners(?string $eventName = null): bool;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user