1 | <?php |
||
15 | class GenericCallbackEventListener implements EventListener { |
||
16 | |||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $callbacks = array(); |
||
21 | |||
22 | /** |
||
23 | * @var boolean |
||
24 | */ |
||
25 | private $propagationStopState = false; |
||
26 | |||
27 | /** |
||
28 | * @since 1.0 |
||
29 | * |
||
30 | * @param Closure|callable|null $callback |
||
31 | */ |
||
32 | 8 | public function __construct( $callback = null ) { |
|
37 | |||
38 | /** |
||
39 | * @since 1.0 |
||
40 | * |
||
41 | * @param Closure|callable $callback |
||
42 | * @throws RuntimeException |
||
43 | */ |
||
44 | 6 | public function registerCallback( $callback ) { |
|
54 | |||
55 | /** |
||
56 | * @since 1.0 |
||
57 | * |
||
58 | * {@inheritDoc} |
||
59 | */ |
||
60 | 5 | public function execute( DispatchContext $dispatchContext = null ) { |
|
65 | |||
66 | /** |
||
67 | * @since 1.0 |
||
68 | * |
||
69 | * @param boolean $propagationStopState |
||
70 | */ |
||
71 | 1 | public function setPropagationStopState( $propagationStopState ) { |
|
74 | |||
75 | /** |
||
76 | * @since 1.0 |
||
77 | * |
||
78 | * {@inheritDoc} |
||
79 | */ |
||
80 | 3 | public function isPropagationStopped() { |
|
83 | |||
84 | } |
||
85 |