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 |
definenode.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @copyright Portions (c) 2009 Fabien Potencier, Armin Ronacher
08 * @license GNU General Public License, version 2 (GPL-2.0)
09 *
10 * For full copyright and license information, please see
11 * the docs/CREDITS.txt file.
12 *
13 */
14
15 namespace phpbb\template\twig\node;
16
17 class definenode extends \Twig\Node\Node
18 {
19 public function __construct($capture, \Twig\Node\Node $name, \Twig\Node\Node $value, $lineno, $tag = null)
20 {
21 parent::__construct(array('name' => $name, 'value' => $value), array('capture' => $capture, 'safe' => false), $lineno, $tag);
22 }
23
24 /**
25 * Compiles the node to PHP.
26 *
27 * @param \Twig\Compiler A Twig\Compiler instance
28 */
29 public function compile(\Twig\Compiler $compiler)
30 {
31 $compiler->addDebugInfo($this);
32
33 if ($this->getAttribute('capture'))
34 {
35 $compiler
36 ->write("ob_start();\n")
37 ->subcompile($this->getNode('value'))
38 ;
39
40 $compiler->write("\$value = ('' === \$value = ob_get_clean()) ? '' : new \Twig\Markup(\$value, \$this->env->getCharset());\n");
41 }
42 else
43 {
44 $compiler
45 ->write("\$value = ")
46 ->subcompile($this->getNode('value'))
47 ->raw(";\n")
48 ;
49 }
50
51 $compiler
52 ->write("\$context['definition']->set('")
53 ->raw($this->getNode('name')->getAttribute('name'))
54 ->raw("', \$value);\n")
55 ;
56 }
57 }
58