HumHub Documentation (unofficial)

Compiler
in package

Tags
author

Fabien Potencier fabien@symfony.com

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 = []

$sourceOffset

private mixed $sourceOffset

$varNameSalt

private mixed $varNameSalt = 0

Methods

addDebugInfo()

public addDebugInfo(Node $node) : $this
Parameters
$node : Node
Return values
$this

compile()

public compile(Node $node[, int $indentation = 0 ]) : $this
Parameters
$node : Node
$indentation : int = 0
Return values
$this

getDebugInfo()

public getDebugInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSource()

public getSource() : string
Return values
string

getVarName()

public getVarName() : string
Return values
string

indent()

public indent([int $step = 1 ]) : $this
Parameters
$step : int = 1
Return values
$this

outdent()

public outdent([int $step = 1 ]) : $this
Parameters
$step : int = 1
Tags
throws
LogicException

When trying to outdent too much so the indentation would become negative

Return values
$this

raw()

Adds a raw string to the compiled code.

public raw(string $string) : $this
Parameters
$string : string
Return values
$this

repr()

Returns a PHP representation of a given value.

public repr(mixed $value) : $this
Parameters
$value : mixed
Return values
$this

reset()

public reset([int $indentation = 0 ]) : $this
Parameters
$indentation : int = 0
Return values
$this

string()

Adds a quoted string to the compiled code.

public string(string $value) : $this
Parameters
$value : string
Return values
$this

subcompile()

public subcompile(Node $node[, bool $raw = true ]) : $this
Parameters
$node : Node
$raw : bool = true
Return values
$this

write()

Writes a string to the compiled code by adding indentation.

public write(mixed ...$strings) : $this
Parameters
$strings : mixed
Return values
$this

checkForEcho()

private checkForEcho(string $string) : void
Parameters
$string : string

        
On this page

Search results