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 |
StopwatchNode.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\Bridge\Twig\Node;
13
14 /**
15 * Represents a stopwatch node.
16 *
17 * @author Wouter J <wouter@wouterj.nl>
18 */
19 class StopwatchNode extends \Twig_Node
20 {
21 public function __construct(\Twig_Node $name, $body, \Twig_Node_Expression_AssignName $var, $lineno = 0, $tag = null)
22 {
23 parent::__construct(array('body' => $body, 'name' => $name, 'var' => $var), array(), $lineno, $tag);
24 }
25
26 public function compile(\Twig_Compiler $compiler)
27 {
28 $compiler
29 ->addDebugInfo($this)
30 ->write('')
31 ->subcompile($this->getNode('var'))
32 ->raw(' = ')
33 ->subcompile($this->getNode('name'))
34 ->write(";\n")
35 ->write("\$this->env->getExtension('stopwatch')->getStopwatch()->start(")
36 ->subcompile($this->getNode('var'))
37 ->raw(", 'template');\n")
38 ->subcompile($this->getNode('body'))
39 ->write("\$this->env->getExtension('stopwatch')->getStopwatch()->stop(")
40 ->subcompile($this->getNode('var'))
41 ->raw(");\n")
42 ;
43 }
44 }
45