ParametersPart
Parameters Part.
For all models that can have parameters
Tags
Table of Contents
- $parameters : array<string|int, PhpParameter>
 - 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.
 - getParameterByName() : PhpParameter
 - Returns a parameter by index or name.
 - getParameterByPosition() : PhpParameter
 - Returns a parameter by index or name.
 - getParameters() : array<string|int, PhpParameter>
 - Returns an array of parameters.
 - hasParameter() : bool
 - Checks whether a parameter exists.
 - removeParameter() : $this
 - Remove the given parameter.
 - removeParameterByName() : $this
 - Remove a parameter having the given name.
 - removeParameterByPosition() : $this
 - Remove the parameter at the given position.
 - replaceParameter() : $this
 - Replaces a parameter at a given position.
 - setParameters() : $this
 - Sets a collection of parameters.
 - generateParamDocblock() : void
 - Generates docblock for params.
 - getDocblock() : Docblock
 - Returns the docblock.
 - checkPosition() : void
 
Properties
$parameters
    private
        array<string|int, PhpParameter>
    $parameters
     = []
        
    
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 —getParameterByName()
Returns a parameter by index or name.
    public
                getParameterByName(string $name) : PhpParameter
        
        Parameters
- $name : string
 
Tags
Return values
PhpParameter —getParameterByPosition()
Returns a parameter by index or name.
    public
                getParameterByPosition(int $position) : PhpParameter
        
        Parameters
- $position : int
 
Tags
Return values
PhpParameter —getParameters()
Returns an array 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
removeParameter()
Remove the given parameter.
    public
                removeParameter(PhpParameter $param) : $this
        
        Parameters
- $param : PhpParameter
 
Tags
Return values
$this —removeParameterByName()
Remove a parameter having the given name.
    public
                removeParameterByName(string $name) : $this
        
        Parameters
- $name : string
 
Tags
Return values
$this —removeParameterByPosition()
Remove the parameter at the given position.
    public
                removeParameterByPosition(int $position) : $this
        
        Parameters
- $position : int
 
Tags
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 —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 —generateParamDocblock()
Generates docblock for params.
    protected
                generateParamDocblock() : void
        
    
    
    Tags
Return values
void —getDocblock()
Returns the docblock.
    protected
    abstract            getDocblock() : Docblock
        
    
    
        Return values
Docblock —checkPosition()
    private
                checkPosition(int $position) : void
        
        Parameters
- $position : int