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 |
ImmutableEventDispatcher.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 * A read-only proxy for an event dispatcher.
016 *
017 * @author Bernhard Schussek <bschussek@gmail.com>
018 */
019 class ImmutableEventDispatcher implements EventDispatcherInterface
020 {
021 /**
022 * The proxied dispatcher.
023 *
024 * @var EventDispatcherInterface
025 */
026 private $dispatcher;
027
028 /**
029 * Creates an unmodifiable proxy for an event dispatcher.
030 *
031 * @param EventDispatcherInterface $dispatcher The proxied event dispatcher
032 */
033 public function __construct(EventDispatcherInterface $dispatcher)
034 {
035 $this->dispatcher = $dispatcher;
036 }
037
038 /**
039 * {@inheritdoc}
040 */
041 public function dispatch($eventName, Event $event = null)
042 {
043 return $this->dispatcher->dispatch($eventName, $event);
044 }
045
046 /**
047 * {@inheritdoc}
048 */
049 public function addListener($eventName, $listener, $priority = 0)
050 {
051 throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
052 }
053
054 /**
055 * {@inheritdoc}
056 */
057 public function addSubscriber(EventSubscriberInterface $subscriber)
058 {
059 throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
060 }
061
062 /**
063 * {@inheritdoc}
064 */
065 public function removeListener($eventName, $listener)
066 {
067 throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
068 }
069
070 /**
071 * {@inheritdoc}
072 */
073 public function removeSubscriber(EventSubscriberInterface $subscriber)
074 {
075 throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
076 }
077
078 /**
079 * {@inheritdoc}
080 */
081 public function getListeners($eventName = null)
082 {
083 return $this->dispatcher->getListeners($eventName);
084 }
085
086 /**
087 * {@inheritdoc}
088 */
089 public function getListenerPriority($eventName, $listener)
090 {
091 return $this->dispatcher->getListenerPriority($eventName, $listener);
092 }
093
094 /**
095 * {@inheritdoc}
096 */
097 public function hasListeners($eventName = null)
098 {
099 return $this->dispatcher->hasListeners($eventName);
100 }
101 }
102