[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 * This file is part of Twig. 5 * 6 * (c) Fabien Potencier 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * 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, $method, ArrayExpression $arguments, $lineno) 19 { 20 parent::__construct(['node' => $node, 'arguments' => $arguments], ['method' => $method, 'safe' => 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 $compiler 30 ->subcompile($this->getNode('node')) 31 ->raw('->') 32 ->raw($this->getAttribute('method')) 33 ->raw('(') 34 ; 35 $first = true; 36 foreach ($this->getNode('arguments')->getKeyValuePairs() as $pair) { 37 if (!$first) { 38 $compiler->raw(', '); 39 } 40 $first = false; 41 42 $compiler->subcompile($pair['value']); 43 } 44 $compiler->raw(')'); 45 } 46 } 47 48 class_alias('Twig\Node\Expression\MethodCallExpression', 'Twig_Node_Expression_MethodCall');
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |