4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\EventDispatcher
;
15 * Event is the base class for classes containing event data.
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.
20 * You can call the method stopPropagation() to abort the execution of
21 * further listeners in your event listener.
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>
33 * @var Boolean Whether no further event listeners should be triggered
35 private $propagationStopped = false;
38 * @var EventDispatcher Dispatcher that dispatched this event
43 * @var string This event's name
48 * Returns whether further event listeners should be triggered.
50 * @see Event::stopPropagation
51 * @return Boolean Whether propagation was already stopped for this event.
55 public function isPropagationStopped()
57 return $this->propagationStopped
;
61 * Stops the propagation of the event to further event listeners.
63 * If multiple event listeners are connected to the same event, no
64 * further event listener will be triggered once any trigger calls
69 public function stopPropagation()
71 $this->propagationStopped
= true;
75 * Stores the EventDispatcher that dispatches this Event
77 * @param EventDispatcherInterface $dispatcher
81 public function setDispatcher(EventDispatcherInterface
$dispatcher)
83 $this->dispatcher
= $dispatcher;
87 * Returns the EventDispatcher that dispatches this Event
89 * @return EventDispatcherInterface
93 public function getDispatcher()
95 return $this->dispatcher
;
99 * Gets the event's name.
105 public function getName()
111 * Sets the event's name property.
113 * @param string $name The event name.
117 public function setName($name)