mediatekformation

ParameterGenerator extends AbstractGenerator
in package

Table of Contents

LINE_FEED  = "\n"
Line feed to use in place of EOL
$defaultValue  : ValueGenerator
$indentation  : int|string
$isSourceDirty  : bool
$name  : string
$passedByReference  : bool
$position  : int
$sourceContent  : string
$type  : TypeGenerator|null
$omitDefaultValue  : bool
$variadic  : bool
__construct()  : mixed
fromArray()  : ParameterGenerator
Generate from array
fromReflection()  : ParameterGenerator
generate()  : string
getDefaultValue()  : ValueGenerator
getIndentation()  : string
getName()  : string
getPassedByReference()  : bool
getPosition()  : int
getSourceContent()  : string
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
expandLiteralParameterType()  : string
extractFQCNTypeFromReflectionType()  : null|string
generateTypeHint()  : string
prePhp7ExtractFQCNTypeFromReflectionType()  : string|null
For ancient PHP versions (yes, you should upgrade to 7.0):

Constants

Properties

Methods

__construct()

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

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

getPassedByReference()

public getPassedByReference() : bool
Return values
bool

getSourceContent()

public getSourceContent() : string
Return values
string

expandLiteralParameterType()

private static expandLiteralParameterType(string $literalParameterType, ReflectionParameter $reflectionParameter) : string
Parameters
$literalParameterType : string
$reflectionParameter : ReflectionParameter
Return values
string

generateTypeHint()

private generateTypeHint() : string
Return values
string

prePhp7ExtractFQCNTypeFromReflectionType()

For ancient PHP versions (yes, you should upgrade to 7.0):

private static prePhp7ExtractFQCNTypeFromReflectionType(ParameterReflection $reflectionParameter) : string|null
Parameters
$reflectionParameter : ParameterReflection
Return values
string|null

Search results