class PhpGenerator

Container PHP code generator.

Traits

Strict class for better experience.

Methods

__construct(ContainerBuilder $builder)

No description

generate(string $className)

Generates PHP classes. First class is the container.

string
toString(ClassType $class)

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 34
__construct(ContainerBuilder $builder)

Parameters

ContainerBuilder $builder

at line 43
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)

Parameters

ClassType $class

Return Value

string

at line 85
Method generateMethod(Definition $def)

Parameters

Definition $def

Return Value

Method

at line 104
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 158
string formatPhp(string $statement, array $args)

Formats PHP statement.

Parameters

string $statement
array $args

Return Value

string

at line 183
array convertParameters(array $parameters)

Converts parameters from Definition to PhpGenerator.

Parameters

array $parameters

Return Value

array

at line 200
string|null getClassName()

Return Value

string|null