Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 65 lines (59 sloc) 1.683 kB
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
1 <?php
2
3 /*
57f10d2 @igorw [EventDispatcher] Change the license of EventDispatcher from LGPL to MIT
igorw authored
4 * This file is part of the Symfony package.
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
5 *
57f10d2 @igorw [EventDispatcher] Change the license of EventDispatcher from LGPL to MIT
igorw authored
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
10 */
11
df13e21 @blue-eyes normalized license messages in PHP files
blue-eyes authored
12 namespace Symfony\Component\EventDispatcher;
13
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
14 /**
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
15 * Event is the base class for classes containing event data.
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
16 *
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
17 * This class contains no event data. It is used by events that do not pass
18 * state information to an event handler when an event is raised.
19 *
20 * You can call the method stopPropagation() to abort the execution of
21 * further listeners in your event listener.
22 *
e180562 @acrobat Minor phpcs fixes
acrobat authored
23 * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
24 * @author Jonathan Wage <jonwage@gmail.com>
25 * @author Roman Borschel <roman@code-factory.org>
26 * @author Bernhard Schussek <bschussek@gmail.com>
87fdf45 @fabpot [EventDispatcher] tweaked public @api
fabpot authored
27 *
28 * @api
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
29 */
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
30 class Event
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
31 {
32 /**
86d631b @GrahamCampbell [2.3] CS Fixes
GrahamCampbell authored
33 * @var bool Whether no further event listeners should be triggered
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
34 */
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
35 private $propagationStopped = false;
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
36
37 /**
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
38 * Returns whether further event listeners should be triggered.
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
39 *
aabd73b @hhamon Fixes various phpdoc and coding standards.
hhamon authored
40 * @see Event::stopPropagation()
fe30c87 @GrahamCampbell [2.3] CS And DocBlock Fixes
GrahamCampbell authored
41 *
36a4069 @GrahamCampbell Docblock fixes
GrahamCampbell authored
42 * @return bool Whether propagation was already stopped for this event.
87fdf45 @fabpot [EventDispatcher] tweaked public @api
fabpot authored
43 *
44 * @api
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
45 */
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
46 public function isPropagationStopped()
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
47 {
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
48 return $this->propagationStopped;
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
49 }
50
51 /**
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
52 * Stops the propagation of the event to further event listeners.
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
53 *
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
54 * If multiple event listeners are connected to the same event, no
55 * further event listener will be triggered once any trigger calls
56 * stopPropagation().
87fdf45 @fabpot [EventDispatcher] tweaked public @api
fabpot authored
57 *
58 * @api
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
59 */
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
60 public function stopPropagation()
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
61 {
6438e8f @webmozart [EventDispatcher] Replaced EventDispatcher by Doctrine's implementation
webmozart authored
62 $this->propagationStopped = true;
5123042 @fabpot renamed Symfony\Components to Symfony\Component
fabpot authored
63 }
64 }
Something went wrong with that request. Please try again.