ParametersTrait
trait ParametersTrait
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
Remove a parameter at a given position
Returns a collection of parameters
Details
at line line 20
$this
setParameters(array $parameters)
Sets a collection of parameters
at line line 32
$this
addParameter(PhpParameter $parameter)
Adds a parameter
at line line 44
boolean
hasParameter(string $name)
Checks whether a parameter exists
at line line 62
$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 84
$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 103
PhpParameter
getParameter(string|integer $nameOrIndex)
Returns a parameter by index or name
at line line 131
$this
replaceParameter(int $position, PhpParameter $parameter)
Replaces a parameter at a given position
at line line 146
$this
removeParameter(integer $position)
Remove a parameter at a given position
at line line 161
PhpParameter[]
getParameters()
Returns a collection of parameters