CodeGenerator
Code generator.
Generates code for any generateable model
Tags
Table of Contents
- SORT_CONSTANTS_DEFAULT = 'default'
- SORT_METHODS_DEFAULT = 'default'
- SORT_PROPERTIES_DEFAULT = 'default'
- SORT_USESTATEMENTS_DEFAULT = 'default'
- $config : GeneratorConfig
- $generator : ModelGenerator
- __construct() : mixed
- generate() : string
- Generates code from a given model.
- getConfig() : GeneratorConfig
- Returns the used configuration.
Constants
SORT_CONSTANTS_DEFAULT
public
mixed
SORT_CONSTANTS_DEFAULT
= 'default'
SORT_METHODS_DEFAULT
public
mixed
SORT_METHODS_DEFAULT
= 'default'
SORT_PROPERTIES_DEFAULT
public
mixed
SORT_PROPERTIES_DEFAULT
= 'default'
SORT_USESTATEMENTS_DEFAULT
public
mixed
SORT_USESTATEMENTS_DEFAULT
= 'default'
Properties
$config
protected
GeneratorConfig
$config
$generator
protected
ModelGenerator
$generator
Methods
__construct()
public
__construct([mixed $config = null ]) : mixed
Parameters
- $config : mixed = null
Return values
mixed —generate()
Generates code from a given model.
public
generate(AbstractModel $model) : string
Parameters
- $model : AbstractModel
Return values
string —the generated code
getConfig()
Returns the used configuration.
public
getConfig() : GeneratorConfig