This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +38
-6
lines changed Expand file tree Collapse file tree 3 files changed +38
-6
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Zend Framework (http://framework.zend.com/)
4
- *
5
- * @link http://github.com/zendframework/zend-eventmanager for the canonical source repository
6
- * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7
- * @license https://github.com/zendframework/zend-eventmanager/blob/master/LICENSE.md
3
+ * @see https://github.com/zendframework/zend-eventmanager for the canonical source repository
4
+ * @copyright Copyright (c) 2005-2019 Zend Technologies USA Inc. (https://www.zend.com)
5
+ * @license https://github.com/zendframework/zend-eventmanager/blob/master/LICENSE.md New BSD License
8
6
*/
9
7
10
8
namespace Zend \EventManager ;
17
15
* Encapsulates the target context and parameters passed, and provides some
18
16
* behavior for interacting with the event manager.
19
17
*/
20
- class Event implements EventInterface
18
+ class Event implements EventInterface, StoppableEventInterface
21
19
{
22
20
/**
23
21
* @var string Event name
@@ -192,10 +190,20 @@ public function stopPropagation($flag = true)
192
190
/**
193
191
* Is propagation stopped?
194
192
*
193
+ * @deprecated Use isPropagationStopped instead, to make your application
194
+ * forwards-compatible with PSR-14 and zend-eventmanager v4.
195
195
* @return bool
196
196
*/
197
197
public function propagationIsStopped ()
198
198
{
199
199
return $ this ->stopPropagation ;
200
200
}
201
+
202
+ /**
203
+ * {@inheritDoc}
204
+ */
205
+ public function isPropagationStopped ()
206
+ {
207
+ return $ this ->stopPropagation ;
208
+ }
201
209
}
Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ public function stopPropagation($flag = true);
90
90
/**
91
91
* Has this event indicated event propagation should stop?
92
92
*
93
+ * @deprecated Implement StoppableEventInterface instead, to make your
94
+ * application forwards-compatible with PSR-14 and zend-eventmanager v4.
93
95
* @return bool
94
96
*/
95
97
public function propagationIsStopped ();
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * @see https://github.com/zendframework/zend-eventmanager for the canonical source repository
4
+ * @copyright Copyright (c) 2019 Zend Technologies USA Inc. (https://www.zend.com)
5
+ * @license https://github.com/zendframework/zend-eventmanager/blob/master/LICENSE.md New BSD License
6
+ */
7
+
8
+ namespace Zend \EventManager ;
9
+
10
+ /**
11
+ * Forwards-compatibility shim for the PSR-14 StoppableEventInterface
12
+ *
13
+ * This interface can be mixed into the `Event` instance to make it
14
+ * forwards-compatible with PSR-14.
15
+ */
16
+ interface StoppableEventInterface
17
+ {
18
+ /**
19
+ * @return bool
20
+ */
21
+ public function isPropagationStopped ();
22
+ }
You can’t perform that action at this time.
0 commit comments