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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

ImmutableEventDispatcher.php

Zuletzt modifiziert: 09.10.2024, 12:58 - Dateigröße: 2.18 KiB


01  <?php
02   
03  /*
04   * This file is part of the Symfony package.
05   *
06   * (c) Fabien Potencier <fabien@symfony.com>
07   *
08   * For the full copyright and license information, please view the LICENSE
09   * file that was distributed with this source code.
10   */
11   
12  namespace Symfony\Component\EventDispatcher;
13   
14  /**
15   * A read-only proxy for an event dispatcher.
16   *
17   * @author Bernhard Schussek <bschussek@gmail.com>
18   */
19  class ImmutableEventDispatcher implements EventDispatcherInterface
20  {
21      /**
22       * The proxied dispatcher.
23       * @var EventDispatcherInterface
24       */
25      private $dispatcher;
26   
27      /**
28       * Creates an unmodifiable proxy for an event dispatcher.
29       *
30       * @param EventDispatcherInterface $dispatcher The proxied event dispatcher.
31       */
32      public function __construct(EventDispatcherInterface $dispatcher)
33      {
34          $this->dispatcher = $dispatcher;
35      }
36   
37      /**
38       * {@inheritdoc}
39       */
40      public function dispatch($eventName, Event $event = null)
41      {
42          return $this->dispatcher->dispatch($eventName, $event);
43      }
44   
45      /**
46       * {@inheritdoc}
47       */
48      public function addListener($eventName, $listener, $priority = 0)
49      {
50          throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
51      }
52   
53      /**
54       * {@inheritdoc}
55       */
56      public function addSubscriber(EventSubscriberInterface $subscriber)
57      {
58          throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
59      }
60   
61      /**
62       * {@inheritdoc}
63       */
64      public function removeListener($eventName, $listener)
65      {
66          throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
67      }
68   
69      /**
70       * {@inheritdoc}
71       */
72      public function removeSubscriber(EventSubscriberInterface $subscriber)
73      {
74          throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
75      }
76   
77      /**
78       * {@inheritdoc}
79       */
80      public function getListeners($eventName = null)
81      {
82          return $this->dispatcher->getListeners($eventName);
83      }
84   
85      /**
86       * {@inheritdoc}
87       */
88      public function hasListeners($eventName = null)
89      {
90          return $this->dispatcher->hasListeners($eventName);
91      }
92  }
93