Compiler
in package
Tags
Table of Contents
Properties
- $debugInfo : mixed
- $didUseEcho : mixed
- $didUseEchoStack : mixed
- $env : mixed
- $indentation : mixed
- $lastLine : mixed
- $source : mixed
- $sourceLine : mixed
- $sourceOffset : mixed
- $varNameSalt : mixed
Methods
- __construct() : mixed
- addDebugInfo() : $this
- compile() : $this
- getDebugInfo() : array<string|int, mixed>
- getEnvironment() : Environment
- getSource() : string
- getVarName() : string
- indent() : $this
- outdent() : $this
- raw() : $this
- Adds a raw string to the compiled code.
- repr() : $this
- Returns a PHP representation of a given value.
- reset() : $this
- string() : $this
- Adds a quoted string to the compiled code.
- subcompile() : $this
- write() : $this
- Writes a string to the compiled code by adding indentation.
- checkForEcho() : void
Properties
$debugInfo
private
mixed
$debugInfo
= []
$didUseEcho
private
mixed
$didUseEcho
= false
$didUseEchoStack
private
mixed
$didUseEchoStack
= []
$env
private
mixed
$env
$indentation
private
mixed
$indentation
$lastLine
private
mixed
$lastLine
$source
private
mixed
$source
$sourceLine
private
mixed
$sourceLine
$sourceOffset
private
mixed
$sourceOffset
$varNameSalt
private
mixed
$varNameSalt
= 0
Methods
__construct()
public
__construct(Environment $env) : mixed
Parameters
- $env : Environment
addDebugInfo()
public
addDebugInfo(Node $node) : $this
Parameters
- $node : Node
Return values
$thiscompile()
public
compile(Node $node[, int $indentation = 0 ]) : $this
Parameters
- $node : Node
- $indentation : int = 0
Return values
$thisgetDebugInfo()
public
getDebugInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>getEnvironment()
public
getEnvironment() : Environment
Return values
EnvironmentgetSource()
public
getSource() : string
Return values
stringgetVarName()
public
getVarName() : string
Return values
stringindent()
public
indent([int $step = 1 ]) : $this
Parameters
- $step : int = 1
Return values
$thisoutdent()
public
outdent([int $step = 1 ]) : $this
Parameters
- $step : int = 1
Tags
Return values
$thisraw()
Adds a raw string to the compiled code.
public
raw(string $string) : $this
Parameters
- $string : string
Return values
$thisrepr()
Returns a PHP representation of a given value.
public
repr(mixed $value) : $this
Parameters
- $value : mixed
Return values
$thisreset()
public
reset([int $indentation = 0 ]) : $this
Parameters
- $indentation : int = 0
Return values
$thisstring()
Adds a quoted string to the compiled code.
public
string(string $value) : $this
Parameters
- $value : string
Return values
$thissubcompile()
public
subcompile(Node $node[, bool $raw = true ]) : $this
Parameters
- $node : Node
- $raw : bool = true
Return values
$thiswrite()
Writes a string to the compiled code by adding indentation.
public
write(mixed ...$strings) : $this
Parameters
- $strings : mixed
Return values
$thischeckForEcho()
private
checkForEcho(string $string) : void
Parameters
- $string : string