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 |
ImportNode.php
01 <?php
02
03 /*
04 * This file is part of Twig.
05 *
06 * (c) 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 namespace Twig\Node;
13
14 use Twig\Compiler;
15 use Twig\Node\Expression\AbstractExpression;
16 use Twig\Node\Expression\NameExpression;
17
18 /**
19 * Represents an import node.
20 *
21 * @author Fabien Potencier <fabien@symfony.com>
22 */
23 class ImportNode extends Node
24 {
25 public function __construct(AbstractExpression $expr, AbstractExpression $var, int $lineno, string $tag = null, bool $global = true)
26 {
27 parent::__construct(['expr' => $expr, 'var' => $var], ['global' => $global], $lineno, $tag);
28 }
29
30 public function compile(Compiler $compiler)
31 {
32 $compiler
33 ->addDebugInfo($this)
34 ->write('$macros[')
35 ->repr($this->getNode('var')->getAttribute('name'))
36 ->raw('] = ')
37 ;
38
39 if ($this->getAttribute('global')) {
40 $compiler
41 ->raw('$this->macros[')
42 ->repr($this->getNode('var')->getAttribute('name'))
43 ->raw('] = ')
44 ;
45 }
46
47 if ($this->getNode('expr') instanceof NameExpression && '_self' === $this->getNode('expr')->getAttribute('name')) {
48 $compiler->raw('$this');
49 } else {
50 $compiler
51 ->raw('$this->loadTemplate(')
52 ->subcompile($this->getNode('expr'))
53 ->raw(', ')
54 ->repr($this->getTemplateName())
55 ->raw(', ')
56 ->repr($this->getTemplateLine())
57 ->raw(')->unwrap()')
58 ;
59 }
60
61 $compiler->raw(";\n");
62 }
63 }
64
65 class_alias('Twig\Node\ImportNode', 'Twig_Node_Import');
66