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

Profiler.php

Zuletzt modifiziert: 09.10.2024, 12:58 - Dateigröße: 1009.00 Bytes


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  class Twig_Extension_Profiler extends Twig_Extension
13  {
14      private $actives = array();
15   
16      public function __construct(Twig_Profiler_Profile $profile)
17      {
18          $this->actives[] = $profile;
19      }
20   
21      public function enter(Twig_Profiler_Profile $profile)
22      {
23          $this->actives[0]->addProfile($profile);
24          array_unshift($this->actives, $profile);
25      }
26   
27      public function leave(Twig_Profiler_Profile $profile)
28      {
29          $profile->leave();
30          array_shift($this->actives);
31   
32          if (1 === count($this->actives)) {
33              $this->actives[0]->leave();
34          }
35      }
36   
37      public function getNodeVisitors()
38      {
39          return array(new Twig_Profiler_NodeVisitor_Profiler($this->getName()));
40      }
41   
42      public function getName()
43      {
44          return 'profiler';
45      }
46  }
47