class CodeFileGenerator extends CodeGenerator

Code file generator.

Generates code for a model and puts it into a file with <?php statements. Can also generate header comments.

Constants

SORT_USESTATEMENTS_DEFAULT

SORT_CONSTANTS_DEFAULT

SORT_PROPERTIES_DEFAULT

SORT_METHODS_DEFAULT

Methods

__construct(CodeGeneratorConfig|array $config = null)

Creates a new CodeFileGenerator

getConfig()

Returns the used configuration

string
generate(GenerateableInterface $model)

Generates code from a given model

Details

at line line 25
__construct(CodeGeneratorConfig|array $config = null)

Creates a new CodeFileGenerator

Parameters

CodeGeneratorConfig|array $config

See also

https://php-code-generator.readthedocs.org/en/latest/generator.html

at line line 44
CodeGeneratorConfig getConfig()

Returns the used configuration

Return Value

CodeGeneratorConfig

at line line 51
string generate(GenerateableInterface $model)

Generates code from a given model

Parameters

GenerateableInterface $model

Return Value

string the generated code