| 1 |
efrain |
1 |
<?php
|
|
|
2 |
declare(strict_types=1);
|
|
|
3 |
|
|
|
4 |
namespace 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 |
}
|