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 |
TestExpression.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\Expression;
13
14 use Twig\Compiler;
15 use Twig\Node\Node;
16
17 class TestExpression extends CallExpression
18 {
19 public function __construct(Node $node, string $name, ?Node $arguments, int $lineno)
20 {
21 $nodes = ['node' => $node];
22 if (null !== $arguments) {
23 $nodes['arguments'] = $arguments;
24 }
25
26 parent::__construct($nodes, ['name' => $name], $lineno);
27 }
28
29 public function compile(Compiler $compiler)
30 {
31 $name = $this->getAttribute('name');
32 $test = $compiler->getEnvironment()->getTest($name);
33
34 $this->setAttribute('name', $name);
35 $this->setAttribute('type', 'test');
36 $this->setAttribute('arguments', $test->getArguments());
37 $this->setAttribute('callable', $test->getCallable());
38 $this->setAttribute('is_variadic', $test->isVariadic());
39
40 $this->compileCallable($compiler);
41 }
42 }
43
44 class_alias('Twig\Node\Expression\TestExpression', 'Twig_Node_Expression_Test');
45