RoutineInterface
Table of Contents
- addParameter() : $this
- Adds a parameter.
- addSimpleDescParameter() : $this
- A quick way to add a parameter with description which is created from the given parameters.
- addSimpleParameter() : $this
- A quick way to add a parameter which is created from the given parameters.
- getBody() : string
- Returns the body.
- getName() : string
- Returns the name of the routine.
- getParameterByName() : PhpParameter
- Returns a parameter by name.
- getParameterByPosition() : PhpParameter
- Returns a parameter from a given position.
- getParameters() : array<string|int, PhpParameter>
- Returns a collection of parameters.
- hasParameter() : bool
- Checks whether a parameter exists.
- isReferenceReturned() : bool
- Returns whether a reference is returned.
- removeParameter() : $this
- Remove a parameter.
- replaceParameter() : $this
- Replaces a parameter at a given position.
- setBody() : $this
- Sets the body for this.
- setParameters() : $this
- Sets a collection of parameters.
- setReferenceReturned() : $this
- Set true if a reference is returned of false if not.
Methods
addParameter()
Adds a parameter.
public
addParameter(PhpParameter $parameter) : $this
Parameters
- $parameter : PhpParameter
Return values
$this —addSimpleDescParameter()
A quick way to add a parameter with description which is created from the given parameters.
public
addSimpleDescParameter(string $name[, string|null $type = null ][, string|null $typeDescription = null ][, mixed $defaultValue = null ]) : $this
Parameters
- $name : string
- $type : string|null = null
- $typeDescription : string|null = null
- $defaultValue : mixed = null
-
omit the argument to define no default value
Return values
$this —addSimpleParameter()
A quick way to add a parameter which is created from the given parameters.
public
addSimpleParameter(string $name[, string|null $type = null ][, mixed $defaultValue = null ]) : $this
Parameters
- $name : string
- $type : string|null = null
- $defaultValue : mixed = null
-
omit the argument to define no default value
Return values
$this —getBody()
Returns the body.
public
getBody() : string
Return values
string —getName()
Returns the name of the routine.
public
getName() : string
Return values
string —getParameterByName()
Returns a parameter by name.
public
getParameterByName(string $name) : PhpParameter
Parameters
- $name : string
Tags
Return values
PhpParameter —getParameterByPosition()
Returns a parameter from a given position.
public
getParameterByPosition(int $position) : PhpParameter
Parameters
- $position : int
Tags
Return values
PhpParameter —getParameters()
Returns a collection of parameters.
public
getParameters() : array<string|int, PhpParameter>
Return values
array<string|int, PhpParameter> —hasParameter()
Checks whether a parameter exists.
public
hasParameter(string $name) : bool
Parameters
- $name : string
-
parameter name
Return values
bool —true
if a parameter exists and false
if not
isReferenceReturned()
Returns whether a reference is returned.
public
isReferenceReturned() : bool
Return values
bool —removeParameter()
Remove a parameter.
public
removeParameter(PhpParameter $param) : $this
Parameters
- $param : PhpParameter
Return values
$this —replaceParameter()
Replaces a parameter at a given position.
public
replaceParameter(int $position, PhpParameter $parameter) : $this
Parameters
- $position : int
- $parameter : PhpParameter
Tags
Return values
$this —setBody()
Sets the body for this.
public
setBody(string $body) : $this
Parameters
- $body : string
Return values
$this —setParameters()
Sets a collection of parameters.
public
setParameters(array<string|int, PhpParameter> $parameters) : $this
Note: clears all parameters before setting the new ones
Parameters
- $parameters : array<string|int, PhpParameter>
Return values
$this —setReferenceReturned()
Set true if a reference is returned of false if not.
public
setReferenceReturned(bool $bool) : $this
Parameters
- $bool : bool