CallExpression
extends AbstractExpression
in package
AbstractYes
Abstract class for all nodes that represents an expression.
Table of Contents
Properties
- $attributes : mixed
- $lineno : mixed
- $nodes : array<string|int, Node>
- $tag : mixed
- $reflector : mixed
Methods
- __clone() : mixed
- __construct() : mixed
- __toString() : string
- compile() : void
- count() : int
- deprecateAttribute() : void
- deprecateNode() : void
- getAttribute() : mixed
- getIterator() : Traversable
- getNode() : self
- getNodeTag() : string|null
- getSourceContext() : Source|null
- getTemplateLine() : int
- getTemplateName() : string|null
- hasAttribute() : bool
- hasExplicitParentheses() : bool
- hasNode() : bool
- isGenerator() : bool
- removeAttribute() : void
- removeNode() : void
- setAttribute() : void
- setExplicitParentheses() : static
- setNode() : void
- setSourceContext() : void
- compileArguments() : void
- compileCallable() : void
- getArguments() : mixed
- normalizeName() : string
- getCallableParameters() : array<string|int, mixed>
- getTwigCallable() : TwigCallableInterface
- Overrides the Twig callable based on attributes (as potentially, attributes changed between the creation and the compilation of the node).
- reflectCallable() : ReflectionCallable
Properties
$attributes
protected
mixed
$attributes
$lineno
protected
mixed
$lineno
$nodes
protected
array<string|int, Node>
$nodes
$tag
protected
mixed
$tag
$reflector
private
mixed
$reflector
= null
Methods
__clone()
public
__clone() : mixed
__construct()
public
__construct([array<string|int, Node> $nodes = [] ][, array<string|int, mixed> $attributes = [] ][, int $lineno = 0 ]) : mixed
Parameters
- $nodes : array<string|int, Node> = []
-
An array of named nodes
- $attributes : array<string|int, mixed> = []
-
An array of attributes (should not be nodes)
- $lineno : int = 0
-
The line number
__toString()
public
__toString() : string
Return values
stringcompile()
public
compile(Compiler $compiler) : void
Parameters
- $compiler : Compiler
count()
public
count() : int
Attributes
- #[ReturnTypeWillChange]
Return values
intdeprecateAttribute()
public
deprecateAttribute(string $name, NameDeprecation $dep) : void
Parameters
- $name : string
- $dep : NameDeprecation
deprecateNode()
public
deprecateNode(string|int $name, NameDeprecation $dep) : void
Parameters
- $name : string|int
- $dep : NameDeprecation
getAttribute()
public
getAttribute(string $name) : mixed
Parameters
- $name : string
getIterator()
public
getIterator() : Traversable
Return values
TraversablegetNode()
public
getNode(string|int $name) : self
Parameters
- $name : string|int
Return values
selfgetNodeTag()
public
getNodeTag() : string|null
Return values
string|nullgetSourceContext()
public
getSourceContext() : Source|null
Return values
Source|nullgetTemplateLine()
public
getTemplateLine() : int
Return values
intgetTemplateName()
public
getTemplateName() : string|null
Return values
string|nullhasAttribute()
public
hasAttribute(string $name) : bool
Parameters
- $name : string
Return values
boolhasExplicitParentheses()
public
hasExplicitParentheses() : bool
Return values
boolhasNode()
public
hasNode(string|int $name) : bool
Parameters
- $name : string|int
Return values
boolisGenerator()
public
isGenerator() : bool
Return values
boolremoveAttribute()
public
removeAttribute(string $name) : void
Parameters
- $name : string
removeNode()
public
removeNode(string|int $name) : void
Parameters
- $name : string|int
setAttribute()
public
setAttribute(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
setExplicitParentheses()
public
setExplicitParentheses() : static
Return values
staticsetNode()
public
setNode(string|int $name, self $node) : void
Parameters
- $name : string|int
- $node : self
setSourceContext()
public
setSourceContext(Source $source) : void
Parameters
- $source : Source
compileArguments()
protected
compileArguments(Compiler $compiler[, mixed $isArray = false ]) : void
Parameters
- $compiler : Compiler
- $isArray : mixed = false
compileCallable()
protected
compileCallable(Compiler $compiler) : void
Parameters
- $compiler : Compiler
getArguments()
protected
getArguments(mixed $callable, mixed $arguments) : mixed
since Twig 3.12, use Twig\Util\CallableArgumentsExtractor::getArguments() instead
Parameters
- $callable : mixed
- $arguments : mixed
normalizeName()
protected
normalizeName(string $name) : string
since Twig 3.12
Parameters
- $name : string
Return values
stringgetCallableParameters()
private
getCallableParameters(mixed $callable, bool $isVariadic) : array<string|int, mixed>
Parameters
- $callable : mixed
- $isVariadic : bool
Return values
array<string|int, mixed>getTwigCallable()
Overrides the Twig callable based on attributes (as potentially, attributes changed between the creation and the compilation of the node).
private
getTwigCallable() : TwigCallableInterface
To be removed in 4.0 and replace by $this->getAttribute('twig_callable').
Return values
TwigCallableInterfacereflectCallable()
private
reflectCallable(TwigCallableInterface $callable) : ReflectionCallable
Parameters
- $callable : TwigCallableInterface