function GetAttrExpression::__construct
Parameters
ArrayExpression|NameExpression|null $arguments:
Overrides Node::__construct
File
-
vendor/
twig/ twig/ src/ Node/ Expression/ GetAttrExpression.php, line 25
Class
Namespace
Twig\Node\ExpressionCode
public function __construct(AbstractExpression $node, AbstractExpression $attribute, ?AbstractExpression $arguments, string $type, int $lineno) {
$nodes = [
'node' => $node,
'attribute' => $attribute,
];
if (null !== $arguments) {
$nodes['arguments'] = $arguments;
}
if ($arguments && !$arguments instanceof ArrayExpression && !$arguments instanceof NameExpression) {
trigger_deprecation('twig/twig', '3.15', \sprintf('Not passing a "%s" instance as the "arguments" argument of the "%s" constructor is deprecated ("%s" given).', ArrayExpression::class, static::class, $arguments::class));
}
parent::__construct($nodes, [
'type' => $type,
'is_defined_test' => false,
'ignore_strict_check' => false,
'optimizable' => true,
], $lineno);
}