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

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

ErrorsLoggerListener.php

Zuletzt modifiziert: 09.10.2024, 12:56 - Dateigröße: 1.56 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\HttpKernel\EventListener;
13   
14  @trigger_error('The '.__NAMESPACE__.'\ErrorsLoggerListener class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\EventListener\DebugHandlersListener class instead.', E_USER_DEPRECATED);
15   
16  use Psr\Log\LoggerInterface;
17  use Symfony\Component\Debug\ErrorHandler;
18  use Symfony\Component\EventDispatcher\EventSubscriberInterface;
19  use Symfony\Component\HttpKernel\KernelEvents;
20   
21  /**
22   * Injects the logger into the ErrorHandler, so that it can log various errors.
23   *
24   * @author Colin Frei <colin@colinfrei.com>
25   * @author Konstantin Myakshin <koc-dp@yandex.ru>
26   *
27   * @deprecated since version 2.6, to be removed in 3.0. Use the DebugHandlersListener class instead.
28   */
29  class ErrorsLoggerListener implements EventSubscriberInterface
30  {
31      private $channel;
32      private $logger;
33   
34      public function __construct($channel, LoggerInterface $logger = null)
35      {
36          $this->channel = $channel;
37          $this->logger = $logger;
38      }
39   
40      public function injectLogger()
41      {
42          if (null !== $this->logger) {
43              ErrorHandler::setLogger($this->logger, $this->channel);
44              $this->logger = null;
45          }
46      }
47   
48      public static function getSubscribedEvents()
49      {
50          return array(KernelEvents::REQUEST => array('injectLogger', 2048));
51      }
52  }
53