ParameterBuilder extends AbstractBuilder Uses ValueBuilderPart, TypeBuilderPart
Table of Contents
- $generator : ModelGenerator
- $noTypeHints : array<string|int, string>
- $php7typeHints : array<string|int, string>
- $typeHintMap : array<string|int, mixed>
- $config : GeneratorConfig
- $writer : Writer
- __construct() : mixed
- build() : void
- buildDocblock() : void
- ensureBlankLine() : void
- generate() : void
- getConfig() : GeneratorConfig
- getWriter() : Writer
- checkNullable() : string
- Manage nullable types.
- exportVar() : mixed|string
- getType() : string|null
- removeThis() : string
- Remove `$this` key, from the list of the return types. I.e:.
- writeValue() : void
Properties
$generator
protected
ModelGenerator
$generator
$noTypeHints
protected
static array<string|int, string>
$noTypeHints
= ['string', 'int', 'integer', 'bool', 'boolean', 'float', 'double', 'object', 'mixed', 'resource', '$this']
$php7typeHints
protected
static array<string|int, string>
$php7typeHints
= ['string', 'int', 'integer', 'bool', 'boolean', 'float', 'double']
$typeHintMap
protected
static array<string|int, mixed>
$typeHintMap
= ['string' => 'string', 'int' => 'int', 'integer' => 'int', 'bool' => 'bool', 'boolean' => 'bool', 'float' => 'float', 'double' => 'float']
$config
private
GeneratorConfig
$config
$writer
private
Writer
$writer
Methods
__construct()
public
__construct(ModelGenerator $generator) : mixed
Parameters
- $generator : ModelGenerator
Return values
mixed —build()
public
build(AbstractModel $model) : void
Parameters
- $model : AbstractModel
Return values
void —buildDocblock()
protected
buildDocblock(DocblockInterface $model) : void
Parameters
- $model : DocblockInterface
Return values
void —ensureBlankLine()
protected
ensureBlankLine() : void
Return values
void —generate()
protected
generate(AbstractModel $model) : void
Parameters
- $model : AbstractModel
Return values
void —getConfig()
protected
getConfig() : GeneratorConfig
Return values
GeneratorConfig —getWriter()
protected
getWriter() : Writer
Return values
Writer —checkNullable()
Manage nullable types.
private
checkNullable(string $type) : string
Parameters
- $type : string
Return values
string —exportVar()
private
exportVar(mixed $value) : mixed|string
Parameters
- $value : mixed
Return values
mixed|string —getType()
private
getType(AbstractModel $model) : string|null
Parameters
- $model : AbstractModel
Tags
Return values
string|null —removeThis()
Remove `$this` key, from the list of the return types. I.e:.
private
removeThis(string $type) : string
Parameters
- $type : string
Tags
Return values
string —writeValue()
private
writeValue(ValueInterface $model) : void
Parameters
- $model : ValueInterface