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 |
FunctionExpression.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 FunctionExpression extends CallExpression
18 {
19 public function __construct(string $name, Node $arguments, int $lineno)
20 {
21 parent::__construct(['arguments' => $arguments], ['name' => $name, 'is_defined_test' => false], $lineno);
22 }
23
24 public function compile(Compiler $compiler)
25 {
26 $name = $this->getAttribute('name');
27 $function = $compiler->getEnvironment()->getFunction($name);
28
29 $this->setAttribute('name', $name);
30 $this->setAttribute('type', 'function');
31 $this->setAttribute('needs_environment', $function->needsEnvironment());
32 $this->setAttribute('needs_context', $function->needsContext());
33 $this->setAttribute('arguments', $function->getArguments());
34 $callable = $function->getCallable();
35 if ('constant' === $name && $this->getAttribute('is_defined_test')) {
36 $callable = 'twig_constant_is_defined';
37 }
38 $this->setAttribute('callable', $callable);
39 $this->setAttribute('is_variadic', $function->isVariadic());
40
41 $this->compileCallable($compiler);
42 }
43 }
44
45 class_alias('Twig\Node\Expression\FunctionExpression', 'Twig_Node_Expression_Function');
46