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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
DumpListener.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 Symfony\Component\Console\ConsoleEvents;
15 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
16 use Symfony\Component\VarDumper\Cloner\ClonerInterface;
17 use Symfony\Component\VarDumper\Dumper\DataDumperInterface;
18 use Symfony\Component\VarDumper\VarDumper;
19
20 /**
21 * Configures dump() handler.
22 *
23 * @author Nicolas Grekas <p@tchwork.com>
24 */
25 class DumpListener implements EventSubscriberInterface
26 {
27 private $cloner;
28 private $dumper;
29
30 /**
31 * @param ClonerInterface $cloner Cloner service
32 * @param DataDumperInterface $dumper Dumper service
33 */
34 public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper)
35 {
36 $this->cloner = $cloner;
37 $this->dumper = $dumper;
38 }
39
40 public function configure()
41 {
42 $cloner = $this->cloner;
43 $dumper = $this->dumper;
44
45 VarDumper::setHandler(function ($var) use ($cloner, $dumper) {
46 $dumper->dump($cloner->cloneVar($var));
47 });
48 }
49
50 public static function getSubscribedEvents()
51 {
52 // Register early to have a working dump() as early as possible
53 return array(ConsoleEvents::COMMAND => array('configure', 1024));
54 }
55 }
56