Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

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: 02.04.2025, 15:02 - Dateigröße: 2.12 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      private $dispatcher;
22   
23      public function __construct(EventDispatcherInterface $dispatcher)
24      {
25          $this->dispatcher = $dispatcher;
26      }
27   
28      /**
29       * {@inheritdoc}
30       */
31      public function dispatch($eventName, Event $event = null)
32      {
33          return $this->dispatcher->dispatch($eventName, $event);
34      }
35   
36      /**
37       * {@inheritdoc}
38       */
39      public function addListener($eventName, $listener, $priority = 0)
40      {
41          throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
42      }
43   
44      /**
45       * {@inheritdoc}
46       */
47      public function addSubscriber(EventSubscriberInterface $subscriber)
48      {
49          throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
50      }
51   
52      /**
53       * {@inheritdoc}
54       */
55      public function removeListener($eventName, $listener)
56      {
57          throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
58      }
59   
60      /**
61       * {@inheritdoc}
62       */
63      public function removeSubscriber(EventSubscriberInterface $subscriber)
64      {
65          throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
66      }
67   
68      /**
69       * {@inheritdoc}
70       */
71      public function getListeners($eventName = null)
72      {
73          return $this->dispatcher->getListeners($eventName);
74      }
75   
76      /**
77       * {@inheritdoc}
78       */
79      public function getListenerPriority($eventName, $listener)
80      {
81          return $this->dispatcher->getListenerPriority($eventName, $listener);
82      }
83   
84      /**
85       * {@inheritdoc}
86       */
87      public function hasListeners($eventName = null)
88      {
89          return $this->dispatcher->hasListeners($eventName);
90      }
91  }
92