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 |
Html.php
01 <?php
02
03 /*
04 * This file is part of Twig.
05 *
06 * (c) 2015 Fabien Potencier
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 /**
13 * @author Fabien Potencier <fabien@symfony.com>
14 */
15 class Twig_Profiler_Dumper_Html extends Twig_Profiler_Dumper_Text
16 {
17 private static $colors = array(
18 'block' => '#dfd',
19 'macro' => '#ddf',
20 'template' => '#ffd',
21 'big' => '#d44',
22 );
23
24 public function dump(Twig_Profiler_Profile $profile)
25 {
26 return '<pre>'.parent::dump($profile).'</pre>';
27 }
28
29 protected function formatTemplate(Twig_Profiler_Profile $profile, $prefix)
30 {
31 return sprintf('%s└ <span style="background-color: %s">%s</span>', $prefix, self::$colors['template'], $profile->getTemplate());
32 }
33
34 protected function formatNonTemplate(Twig_Profiler_Profile $profile, $prefix)
35 {
36 return sprintf('%s└ %s::%s(<span style="background-color: %s">%s</span>)', $prefix, $profile->getTemplate(), $profile->getType(), isset(self::$colors[$profile->getType()]) ? self::$colors[$profile->getType()] : 'auto', $profile->getName());
37 }
38
39 protected function formatTime(Twig_Profiler_Profile $profile, $percent)
40 {
41 return sprintf('<span style="color: %s">%.2fms/%.0f%%</span>', $percent > 20 ? self::$colors['big'] : 'auto', $profile->getDuration() * 1000, $percent);
42 }
43 }
44