Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

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

EventDataCollector.php

Zuletzt modifiziert: 01.05.2026, 11:26 - Dateigröße: 3.33 KiB


 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\HttpKernel\DataCollector;
 013   
 014  use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface;
 015  use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 016  use Symfony\Component\HttpFoundation\Request;
 017  use Symfony\Component\HttpFoundation\Response;
 018   
 019  /**
 020   * EventDataCollector.
 021   *
 022   * @author Fabien Potencier <fabien@symfony.com>
 023   */
 024  class EventDataCollector extends DataCollector implements LateDataCollectorInterface
 025  {
 026      protected $dispatcher;
 027   
 028      public function __construct(EventDispatcherInterface $dispatcher = null)
 029      {
 030          if ($dispatcher instanceof TraceableEventDispatcherInterface && !method_exists($dispatcher, 'reset')) {
 031              @trigger_error(sprintf('Implementing "%s" without the "reset()" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class "%s".', TraceableEventDispatcherInterface::class, \get_class($dispatcher)), \E_USER_DEPRECATED);
 032          }
 033          $this->dispatcher = $dispatcher;
 034      }
 035   
 036      /**
 037       * {@inheritdoc}
 038       */
 039      public function collect(Request $request, Response $response, \Exception $exception = null)
 040      {
 041          $this->data = [
 042              'called_listeners' => [],
 043              'not_called_listeners' => [],
 044          ];
 045      }
 046   
 047      public function reset()
 048      {
 049          $this->data = [];
 050   
 051          if ($this->dispatcher instanceof TraceableEventDispatcherInterface) {
 052              if (!method_exists($this->dispatcher, 'reset')) {
 053                  return; // @deprecated
 054              }
 055   
 056              $this->dispatcher->reset();
 057          }
 058      }
 059   
 060      public function lateCollect()
 061      {
 062          if ($this->dispatcher instanceof TraceableEventDispatcherInterface) {
 063              $this->setCalledListeners($this->dispatcher->getCalledListeners());
 064              $this->setNotCalledListeners($this->dispatcher->getNotCalledListeners());
 065          }
 066          $this->data = $this->cloneVar($this->data);
 067      }
 068   
 069      /**
 070       * Sets the called listeners.
 071       *
 072       * @param array $listeners An array of called listeners
 073       *
 074       * @see TraceableEventDispatcherInterface
 075       */
 076      public function setCalledListeners(array $listeners)
 077      {
 078          $this->data['called_listeners'] = $listeners;
 079      }
 080   
 081      /**
 082       * Gets the called listeners.
 083       *
 084       * @return array An array of called listeners
 085       *
 086       * @see TraceableEventDispatcherInterface
 087       */
 088      public function getCalledListeners()
 089      {
 090          return $this->data['called_listeners'];
 091      }
 092   
 093      /**
 094       * Sets the not called listeners.
 095       *
 096       * @param array $listeners An array of not called listeners
 097       *
 098       * @see TraceableEventDispatcherInterface
 099       */
 100      public function setNotCalledListeners(array $listeners)
 101      {
 102          $this->data['not_called_listeners'] = $listeners;
 103      }
 104   
 105      /**
 106       * Gets the not called listeners.
 107       *
 108       * @return array An array of not called listeners
 109       *
 110       * @see TraceableEventDispatcherInterface
 111       */
 112      public function getNotCalledListeners()
 113      {
 114          return $this->data['not_called_listeners'];
 115      }
 116   
 117      /**
 118       * {@inheritdoc}
 119       */
 120      public function getName()
 121      {
 122          return 'events';
 123      }
 124  }
 125