Compiles a node to PHP code.
package | Default |
---|
__construct(\Twig\Environment $env)
\Twig\Environment
addDebugInfo(\Twig_NodeInterface $node): $this
addIndentation(): $this
deprecated | since 1.27 (to be removed in 2.0). |
---|---|
$this
compile(\Twig_NodeInterface $node,integer $indentation): $this
getDebugInfo()
getEnvironment(): \Twig\Environment
\Twig\Environment
getFilename()
deprecated | since 1.25 (to be removed in 2.0) |
---|---|
getSource(): string
string
The PHP code
getVarName()
indent(integer $step = 1): $this
integer
The number of indentation to add
$this
outdent(integer $step = 1): $this
Throws |
|
---|
integer
The number of indentation to remove
$this
raw(string $string): $this
string
The string
$this
repr(mixed $value): $this
mixed
The value to convert
$this
string(string $value): $this
string
The string
$this
subcompile(\Twig_NodeInterface $node, $raw = true)
write(): $this
$this
lastLine :
source :
indentation :
env :
debugInfo :
sourceOffset :
sourceLine :
filename :
varNameSalt :