Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
Event.php
001 <?php
002
003 /*
004 * This file is part of the Symfony package.
005 *
006 * (c) Fabien Potencier <fabien@symfony.com>
007 *
008 * For the full copyright and license information, please view the LICENSE
009 * file that was distributed with this source code.
010 */
011
012 namespace Symfony\Component\EventDispatcher;
013
014 /**
015 * Event is the base class for classes containing event data.
016 *
017 * This class contains no event data. It is used by events that do not pass
018 * state information to an event handler when an event is raised.
019 *
020 * You can call the method stopPropagation() to abort the execution of
021 * further listeners in your event listener.
022 *
023 * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
024 * @author Jonathan Wage <jonwage@gmail.com>
025 * @author Roman Borschel <roman@code-factory.org>
026 * @author Bernhard Schussek <bschussek@gmail.com>
027 *
028 * @api
029 */
030 class Event
031 {
032 /**
033 * @var bool Whether no further event listeners should be triggered
034 */
035 private $propagationStopped = false;
036
037 /**
038 * @var EventDispatcher Dispatcher that dispatched this event
039 */
040 private $dispatcher;
041
042 /**
043 * @var string This event's name
044 */
045 private $name;
046
047 /**
048 * Returns whether further event listeners should be triggered.
049 *
050 * @see Event::stopPropagation
051 * @return bool Whether propagation was already stopped for this event.
052 *
053 * @api
054 */
055 public function isPropagationStopped()
056 {
057 return $this->propagationStopped;
058 }
059
060 /**
061 * Stops the propagation of the event to further event listeners.
062 *
063 * If multiple event listeners are connected to the same event, no
064 * further event listener will be triggered once any trigger calls
065 * stopPropagation().
066 *
067 * @api
068 */
069 public function stopPropagation()
070 {
071 $this->propagationStopped = true;
072 }
073
074 /**
075 * Stores the EventDispatcher that dispatches this Event
076 *
077 * @param EventDispatcherInterface $dispatcher
078 *
079 * @api
080 */
081 public function setDispatcher(EventDispatcherInterface $dispatcher)
082 {
083 $this->dispatcher = $dispatcher;
084 }
085
086 /**
087 * Returns the EventDispatcher that dispatches this Event
088 *
089 * @return EventDispatcherInterface
090 *
091 * @api
092 */
093 public function getDispatcher()
094 {
095 return $this->dispatcher;
096 }
097
098 /**
099 * Gets the event's name.
100 *
101 * @return string
102 *
103 * @api
104 */
105 public function getName()
106 {
107 return $this->name;
108 }
109
110 /**
111 * Sets the event's name property.
112 *
113 * @param string $name The event name.
114 *
115 * @api
116 */
117 public function setName($name)
118 {
119 $this->name = $name;
120 }
121 }
122