class Compiler

Compiles a node to PHP code.

Methods

__construct(array $functions)

No description

getFunction($name)

No description

string
getSource()

Gets the current PHP code after compilation.

reset()

No description

$this
compile(Node $node)

Compiles a node.

subcompile(Node $node)

No description

$this
raw(string $string)

Adds a raw string to the compiled code.

$this
string(string $value)

Adds a quoted string to the compiled code.

$this
repr(mixed $value)

Returns a PHP representation of a given value.

Details

at line 24
__construct(array $functions)

Parameters

array $functions

at line 29
getFunction($name)

Parameters

$name

at line 39
string getSource()

Gets the current PHP code after compilation.

Return Value

string The PHP code

at line 44
reset()

at line 56
$this compile(Node $node)

Compiles a node.

Parameters

Node $node

Return Value

$this

at line 63
subcompile(Node $node)

Parameters

Node $node

at line 83
$this raw(string $string)

Adds a raw string to the compiled code.

Parameters

string $string The string

Return Value

$this

at line 97
$this string(string $value)

Adds a quoted string to the compiled code.

Parameters

string $value The string

Return Value

$this

at line 111
$this repr(mixed $value)

Returns a PHP representation of a given value.

Parameters

mixed $value The value to convert

Return Value

$this