Documentation

Compiler
in package
implements ResetInterface

Compiles a node to PHP code.

Tags
author

Fabien Potencier fabien@symfony.com

Interfaces, Classes and Traits

ResetInterface
Provides a way to reset an object to its initial state.

Table of Contents

$functions  : mixed
$source  : mixed
__construct()  : mixed
compile()  : $this
Compiles a node.
getFunction()  : mixed
getSource()  : string
Gets the current PHP code after compilation.
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()  : mixed

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $functions) : mixed
Parameters
$functions : array<string|int, mixed>
Return values
mixed

compile()

Compiles a node.

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

getFunction()

public getFunction(string $name) : mixed
Parameters
$name : string
Return values
mixed

getSource()

Gets the current PHP code after compilation.

public getSource() : string
Return values
string

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

The value to convert

Return values
$this

reset()

public reset() : $this
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) : mixed
Parameters
$node : Node
Return values
mixed

Search results