ParametersPart
trait ParametersPart
Parameters Part
For all models that can have parameters
Methods
Sets a collection of parameters
Checks whether a parameter exists
A quick way to add a parameter which is created from the given parameters
A quick way to add a parameter with description which is created from the given parameters
Returns a parameter by index or name
Returns a collection of parameters
Details
at line line 31
$this
setParameters(array $parameters)
Sets a collection of parameters
Note: clears all parameters before setting the new ones
at line line 46
$this
addParameter(PhpParameter $parameter)
Adds a parameter
at line line 58
bool
hasParameter(string $name)
Checks whether a parameter exists
at line line 77
$this
addSimpleParameter(string $name, null|string $type = null, mixed $defaultValue = null)
A quick way to add a parameter which is created from the given parameters
at line line 99
$this
addSimpleDescParameter(string $name, null|string $type = null, null|string $typeDescription = null, mixed $defaultValue = null)
A quick way to add a parameter with description which is created from the given parameters
at line line 119
PhpParameter
getParameter(string|int $nameOrIndex)
Returns a parameter by index or name
at line line 142
$this
replaceParameter(int $position, PhpParameter $parameter)
Replaces a parameter at a given position
at line line 155
$this
removeParameter(int|string|PhpParameter $param)
Remove a parameter at a given position
at line line 197
array
getParameters()
Returns a collection of parameters