trait FunctionLike

Methods

setBody(string $code, array $args = null)

No description

string
getBody()

No description

addBody(string $code, array $args = null)

No description

setParameters(array $val)

No description

array
getParameters()

No description

addParameter(string $name, $defaultValue = null)

No description

removeParameter(string $name)

No description

setVariadic(bool $state = true)

No description

bool
isVariadic()

No description

setReturnType(string|null $val)

No description

string|null
getReturnType()

No description

setReturnReference(bool $state = true)

No description

bool
getReturnReference()

No description

setReturnNullable(bool $state = true)

No description

bool
isReturnNullable()

No description

bool
getReturnNullable() deprecated

No description

setNamespace(PhpNamespace $val = null) deprecated

No description

Details

at line 42
FunctionLike setBody(string $code, array $args = null)

Parameters

string $code
array $args

Return Value

FunctionLike

at line 49
string getBody()

Return Value

string

at line 56
FunctionLike addBody(string $code, array $args = null)

Parameters

string $code
array $args

Return Value

FunctionLike

at line 67
FunctionLike setParameters(array $val)

Parameters

array $val

Return Value

FunctionLike

at line 81
array getParameters()

Return Value

array

at line 90
Parameter addParameter(string $name, $defaultValue = null)

Parameters

string $name
$defaultValue

Return Value

Parameter

at line 104
FunctionLike removeParameter(string $name)

Parameters

string $name without $

Return Value

FunctionLike

at line 112
FunctionLike setVariadic(bool $state = true)

Parameters

bool $state

Return Value

FunctionLike

at line 119
bool isVariadic()

Return Value

bool

at line 126
FunctionLike setReturnType(string|null $val)

Parameters

string|null $val

Return Value

FunctionLike

at line 133
string|null getReturnType()

Return Value

string|null

at line 140
FunctionLike setReturnReference(bool $state = true)

Parameters

bool $state

Return Value

FunctionLike

at line 147
bool getReturnReference()

Return Value

bool

at line 154
FunctionLike setReturnNullable(bool $state = true)

Parameters

bool $state

Return Value

FunctionLike

at line 161
bool isReturnNullable()

Return Value

bool

at line 168
bool getReturnNullable() deprecated

deprecated use isReturnNullable()

Return Value

bool

at line 175
FunctionLike setNamespace(PhpNamespace $val = null) deprecated

deprecated

Parameters

PhpNamespace $val

Return Value

FunctionLike