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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
ErrorsLoggerListener.php
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 use Psr\Log\LoggerInterface;
15 use Symfony\Component\HttpKernel\Debug\ErrorHandler;
16 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
17 use Symfony\Component\HttpKernel\KernelEvents;
18
19 /**
20 * Injects the logger into the ErrorHandler, so that it can log various errors.
21 *
22 * @author Colin Frei <colin@colinfrei.com>
23 * @author Konstantin Myakshin <koc-dp@yandex.ru>
24 */
25 class ErrorsLoggerListener implements EventSubscriberInterface
26 {
27 private $channel;
28
29 private $logger;
30
31 public function __construct($channel, LoggerInterface $logger = null)
32 {
33 $this->channel = $channel;
34 $this->logger = $logger;
35 }
36
37 public function injectLogger()
38 {
39 if (null !== $this->logger) {
40 ErrorHandler::setLogger($this->logger, $this->channel);
41 }
42 }
43
44 public static function getSubscribedEvents()
45 {
46 return array(KernelEvents::REQUEST => 'injectLogger');
47 }
48 }
49