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 |
MethodCallExpression.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
16 class MethodCallExpression extends AbstractExpression
17 {
18 public function __construct(AbstractExpression $node, string $method, ArrayExpression $arguments, int $lineno)
19 {
20 parent::__construct(['node' => $node, 'arguments' => $arguments], ['method' => $method, 'safe' => false, 'is_defined_test' => false], $lineno);
21
22 if ($node instanceof NameExpression) {
23 $node->setAttribute('always_defined', true);
24 }
25 }
26
27 public function compile(Compiler $compiler)
28 {
29 if ($this->getAttribute('is_defined_test')) {
30 $compiler
31 ->raw('method_exists($macros[')
32 ->repr($this->getNode('node')->getAttribute('name'))
33 ->raw('], ')
34 ->repr($this->getAttribute('method'))
35 ->raw(')')
36 ;
37
38 return;
39 }
40
41 $compiler
42 ->raw('twig_call_macro($macros[')
43 ->repr($this->getNode('node')->getAttribute('name'))
44 ->raw('], ')
45 ->repr($this->getAttribute('method'))
46 ->raw(', [')
47 ;
48 $first = true;
49 foreach ($this->getNode('arguments')->getKeyValuePairs() as $pair) {
50 if (!$first) {
51 $compiler->raw(', ');
52 }
53 $first = false;
54
55 $compiler->subcompile($pair['value']);
56 }
57 $compiler
58 ->raw('], ')
59 ->repr($this->getTemplateLine())
60 ->raw(', $context, $this->getSourceContext())');
61 }
62 }
63
64 class_alias('Twig\Node\Expression\MethodCallExpression', 'Twig_Node_Expression_MethodCall');
65