Documentation

ParameterGenerator extends AbstractGenerator
in package

Table of Contents

Constants

LINE_FEED  = "\n"
Line feed to use in place of EOL

Properties

$defaultValue  : ValueGenerator|null
$indentation  : string
$isSourceDirty  : bool
$name  : string
$passedByReference  : bool
$position  : int
$sourceContent  : string|null
TODO: Type should be changed to "string" in the next major version. Nullable for BC
$type  : TypeGenerator|null
$omitDefaultValue  : bool
$variadic  : bool

Methods

__construct()  : mixed
fromArray()  : ParameterGenerator
Generate from array
fromReflection()  : ParameterGenerator
generate()  : string
getDefaultValue()  : ValueGenerator|null
getIndentation()  : string
getName()  : string
getPassedByReference()  : bool
getPosition()  : int
getSourceContent()  : string|null
getType()  : string
getVariadic()  : bool
isSourceDirty()  : bool
omitDefaultValue()  : ParameterGenerator
setDefaultValue()  : ParameterGenerator
Set the default value of the parameter.
setIndentation()  : AbstractGenerator
setName()  : ParameterGenerator
setOptions()  : AbstractGenerator
setPassedByReference()  : ParameterGenerator
setPosition()  : ParameterGenerator
setSourceContent()  : AbstractGenerator
setSourceDirty()  : AbstractGenerator
setType()  : ParameterGenerator
setVariadic()  : ParameterGenerator
generateTypeHint()  : string

Constants

Properties

$sourceContent

TODO: Type should be changed to "string" in the next major version. Nullable for BC

protected string|null $sourceContent = null

Methods

__construct()

public __construct([string|null $name = null ][, string|null $type = null ][, mixed|null $defaultValue = null ][, int|null $position = null ][, bool $passByReference = false ]) : mixed
Parameters
$name : string|null = null
$type : string|null = null
$defaultValue : mixed|null = null
$position : int|null = null
$passByReference : bool = false

fromArray()

Generate from array

public static fromArray(array<string|int, mixed> $array) : ParameterGenerator
Parameters
$array : array<string|int, mixed>
Tags
configkey

name string [required] Class Name

configkey

type string

configkey

defaultvalue null|bool|string|int|float|array|ValueGenerator

configkey

passedbyreference bool

configkey

position int

configkey

sourcedirty bool

configkey

indentation string

configkey

sourcecontent string

configkey

omitdefaultvalue bool

throws
InvalidArgumentException
Return values
ParameterGenerator

getSourceContent()

public getSourceContent() : string|null
Return values
string|null

        
On this page

Search results