EventDispatcherInterface.php
2 years ago
ListenerProviderInterface.php
2 years ago
StoppableEventInterface.php
2 years ago
StoppableEventInterface.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | declare (strict_types=1); |
| 4 | namespace Matomo\Dependencies\Psr\EventDispatcher; |
| 5 | |
| 6 | /** |
| 7 | * An Event whose processing may be interrupted when the event has been handled. |
| 8 | * |
| 9 | * A Dispatcher implementation MUST check to determine if an Event |
| 10 | * is marked as stopped after each listener is called. If it is then it should |
| 11 | * return immediately without calling any further Listeners. |
| 12 | */ |
| 13 | interface StoppableEventInterface |
| 14 | { |
| 15 | /** |
| 16 | * Is propagation stopped? |
| 17 | * |
| 18 | * This will typically only be used by the Dispatcher to determine if the |
| 19 | * previous listener halted propagation. |
| 20 | * |
| 21 | * @return bool |
| 22 | * True if the Event is complete and no further listeners should be called. |
| 23 | * False to continue calling listeners. |
| 24 | */ |
| 25 | public function isPropagationStopped() : bool; |
| 26 | } |
| 27 |