Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
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 use Twig\Compiler;
15 use Twig\Node\Expression\AssignNameExpression;
16 use Twig\Node\Node;
17
18 /**
19 * Represents a stopwatch node.
20 *
21 * @author Wouter J <wouter@wouterj.nl>
22 */
23 class StopwatchNode extends Node
24 {
25 public function __construct(Node $name, Node $body, AssignNameExpression $var, $lineno = 0, $tag = null)
26 {
27 parent::__construct(['body' => $body, 'name' => $name, 'var' => $var], [], $lineno, $tag);
28 }
29
30 public function compile(Compiler $compiler)
31 {
32 $compiler
33 ->addDebugInfo($this)
34 ->write('')
35 ->subcompile($this->getNode('var'))
36 ->raw(' = ')
37 ->subcompile($this->getNode('name'))
38 ->write(";\n")
39 ->write("\$this->env->getExtension('Symfony\Bridge\Twig\Extension\StopwatchExtension')->getStopwatch()->start(")
40 ->subcompile($this->getNode('var'))
41 ->raw(", 'template');\n")
42 ->subcompile($this->getNode('body'))
43 ->write("\$this->env->getExtension('Symfony\Bridge\Twig\Extension\StopwatchExtension')->getStopwatch()->stop(")
44 ->subcompile($this->getNode('var'))
45 ->raw(");\n")
46 ;
47 }
48 }
49