class PhpGenerator

Container PHP code generator.

Methods

__construct(ContainerBuilder $builder)

No description

generate(string $className)

Generates PHP classes. First class is the container.

string
toString(ClassType $class)

No description

void
addInitialization(ClassType $class, CompilerExtension $extension)

No description

generateMethod(Definition $def)

No description

string
formatStatement(Statement $statement)

Formats PHP code for class instantiating, function calling or property setting in PHP.

string
formatPhp(string $statement, array $args)

Formats PHP statement.

array
convertParameters(array $parameters)

Converts parameters from Definition to PhpGenerator.

string|null
getClassName()

No description

Details

at line 33
__construct(ContainerBuilder $builder)

No description

Parameters

ContainerBuilder $builder

at line 42
ClassType generate(string $className)

Generates PHP classes. First class is the container.

Parameters

string $className

Return Value

ClassType

at line 75
string toString(ClassType $class)

No description

Parameters

ClassType $class

Return Value

string

at line 85
void addInitialization(ClassType $class, CompilerExtension $extension)

No description

Parameters

ClassType $class
CompilerExtension $extension

Return Value

void

at line 96
Method generateMethod(Definition $def)

No description

Parameters

Definition $def

Return Value

Method

at line 115
string formatStatement(Statement $statement)

Formats PHP code for class instantiating, function calling or property setting in PHP.

Parameters

Statement $statement

Return Value

string

at line 167
string formatPhp(string $statement, array $args)

internal  
 

Formats PHP statement.

Parameters

string $statement
array $args

Return Value

string

at line 192
array convertParameters(array $parameters)

Converts parameters from Definition to PhpGenerator.

Parameters

array $parameters

Return Value

array

at line 209
string|null getClassName()

No description

Return Value

string|null

Traits

Strict class for better experience.