Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
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 class Event
029 {
030 /**
031 * @var bool Whether no further event listeners should be triggered
032 */
033 private $propagationStopped = false;
034
035 /**
036 * @var EventDispatcher Dispatcher that dispatched this event
037 */
038 private $dispatcher;
039
040 /**
041 * @var string This event's name
042 */
043 private $name;
044
045 /**
046 * Returns whether further event listeners should be triggered.
047 *
048 * @see Event::stopPropagation()
049 *
050 * @return bool Whether propagation was already stopped for this event
051 */
052 public function isPropagationStopped()
053 {
054 return $this->propagationStopped;
055 }
056
057 /**
058 * Stops the propagation of the event to further event listeners.
059 *
060 * If multiple event listeners are connected to the same event, no
061 * further event listener will be triggered once any trigger calls
062 * stopPropagation().
063 */
064 public function stopPropagation()
065 {
066 $this->propagationStopped = true;
067 }
068
069 /**
070 * Stores the EventDispatcher that dispatches this Event.
071 *
072 * @param EventDispatcherInterface $dispatcher
073 *
074 * @deprecated since version 2.4, to be removed in 3.0. The event dispatcher is passed to the listener call.
075 */
076 public function setDispatcher(EventDispatcherInterface $dispatcher)
077 {
078 $this->dispatcher = $dispatcher;
079 }
080
081 /**
082 * Returns the EventDispatcher that dispatches this Event.
083 *
084 * @return EventDispatcherInterface
085 *
086 * @deprecated since version 2.4, to be removed in 3.0. The event dispatcher is passed to the listener call.
087 */
088 public function getDispatcher()
089 {
090 @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED);
091
092 return $this->dispatcher;
093 }
094
095 /**
096 * Gets the event's name.
097 *
098 * @return string
099 *
100 * @deprecated since version 2.4, to be removed in 3.0. The event name is passed to the listener call.
101 */
102 public function getName()
103 {
104 @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED);
105
106 return $this->name;
107 }
108
109 /**
110 * Sets the event's name property.
111 *
112 * @param string $name The event name
113 *
114 * @deprecated since version 2.4, to be removed in 3.0. The event name is passed to the listener call.
115 */
116 public function setName($name)
117 {
118 $this->name = $name;
119 }
120 }
121