Param
in package
implements
Builder
Interfaces, Classes and Traits
Table of Contents
- $byRef : mixed
- $default : mixed
- $name : mixed
- $type : Identifier|Name|NullableType|null
- $variadic : mixed
- __construct() : mixed
- Creates a parameter builder.
- getNode() : Param
- Returns the built parameter node.
- makeByRef() : $this
- Make the parameter accept the value by reference.
- makeVariadic() : $this
- Make the parameter variadic
- setDefault() : $this
- Sets default value for the parameter.
- setType() : $this
- Sets type for the parameter.
- setTypeHint() : $this
- Sets type for the parameter.
Properties
$byRef
protected
mixed
$byRef
= false
$default
protected
mixed
$default
= null
$name
protected
mixed
$name
$type
protected
Identifier|Name|NullableType|null
$type
= null
$variadic
protected
mixed
$variadic
= false
Methods
__construct()
Creates a parameter builder.
public
__construct(string $name) : mixed
Parameters
- $name : string
-
Name of the parameter
Return values
mixed —getNode()
Returns the built parameter node.
public
getNode() : Param
Return values
Param —The built parameter node
makeByRef()
Make the parameter accept the value by reference.
public
makeByRef() : $this
Return values
$this —The builder instance (for fluid interface)
makeVariadic()
Make the parameter variadic
public
makeVariadic() : $this
Return values
$this —The builder instance (for fluid interface)
setDefault()
Sets default value for the parameter.
public
setDefault(mixed $value) : $this
Parameters
- $value : mixed
-
Default value to use
Return values
$this —The builder instance (for fluid interface)
setType()
Sets type for the parameter.
public
setType(string|Name|NullableType|UnionType $type) : $this
Parameters
- $type : string|Name|NullableType|UnionType
-
Parameter type
Return values
$this —The builder instance (for fluid interface)
setTypeHint()
Sets type for the parameter.
public
setTypeHint(string|Name|NullableType|UnionType $type) : $this
Parameters
- $type : string|Name|NullableType|UnionType
-
Parameter type
Tags
Return values
$this —The builder instance (for fluid interface)