Menu

## Param
in package
implements Builder

Param.php : 9

### Interfaces, Classes and Traits

Builder

### Table of Contents

$attributeGroups : array<string|int, AttributeGroup>
$byRef : mixed
$default : mixed
$name : mixed
$type : Identifier|Name|NullableType|null
$variadic : mixed
__construct() : mixed
  Creates a parameter builder.
addAttribute() : $this
  Adds an attribute group.
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

#### $attributeGroups

Param.php : 23
`protected array<string|int, AttributeGroup> $attributeGroups = []`

#### $byRef

Param.php : 18
`protected mixed $byRef = false`

#### $default

Param.php : 13
`protected mixed $default = null`

#### $name

Param.php : 11
`protected mixed $name`

#### $type

Param.php : 16
`protected Identifier|Name|NullableType|null $type = null`

#### $variadic

Param.php : 20
`protected mixed $variadic = false`

### Methods

#### __construct()

Param.php : 30

Creates a parameter builder.

`public __construct(string $name) : mixed`

##### Parameters

$name : string

  Name of the parameter

##### Return values

mixed —

#### addAttribute()

Param.php : 105

Adds an attribute group.

`public addAttribute(Attribute|AttributeGroup $attribute) : $this`

##### Parameters

$attribute : Attribute|AttributeGroup

##### Return values

$this —

The builder instance (for fluid interface)

#### getNode()

Param.php : 116

Returns the built parameter node.

`public getNode() : Param`

##### Return values

Param —

The built parameter node

#### makeByRef()

Param.php : 81

Make the parameter accept the value by reference.

`public makeByRef() : $this`

##### Return values

$this —

The builder instance (for fluid interface)

#### makeVariadic()

Param.php : 92

Make the parameter variadic

`public makeVariadic() : $this`

##### Return values

$this —

The builder instance (for fluid interface)

#### setDefault()

Param.php : 41

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()

Param.php : 54

Sets type for the parameter.

`public setType(string|Name|Identifier|ComplexType $type) : $this`

##### Parameters

$type : string|Name|Identifier|ComplexType

  Parameter type

##### Return values

$this —

The builder instance (for fluid interface)

#### setTypeHint()

Param.php : 72

Sets type for the parameter.

`public setTypeHint(string|Name|Identifier|ComplexType $type) : $this`

##### Parameters

$type : string|Name|Identifier|ComplexType

  Parameter type

##### Tags

deprecated

  Use setType() instead

##### Return values

$this —

The builder instance (for fluid interface)

## Search results