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 |
SpacelessNode.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
16 /**
17 * Represents a spaceless node.
18 *
19 * It removes spaces between HTML tags.
20 *
21 * @deprecated since Twig 2.7, to be removed in 3.0
22 *
23 * @author Fabien Potencier <fabien@symfony.com>
24 */
25 class SpacelessNode extends Node implements NodeOutputInterface
26 {
27 public function __construct(Node $body, int $lineno, string $tag = 'spaceless')
28 {
29 parent::__construct(['body' => $body], [], $lineno, $tag);
30 }
31
32 public function compile(Compiler $compiler)
33 {
34 $compiler
35 ->addDebugInfo($this)
36 ;
37 if ($compiler->getEnvironment()->isDebug()) {
38 $compiler->write("ob_start();\n");
39 } else {
40 $compiler->write("ob_start(function () { return ''; });\n");
41 }
42 $compiler
43 ->subcompile($this->getNode('body'))
44 ->write("echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));\n")
45 ;
46 }
47 }
48
49 class_alias('Twig\Node\SpacelessNode', 'Twig_Node_Spaceless');
50