EnumCase
in package
implements
Builder
Interfaces, Classes and Traits
Table of Contents
- $attributeGroups : array<string|int, AttributeGroup>
- $attributes : mixed
- $name : mixed
- $value : mixed
- __construct() : mixed
- Creates an enum case builder.
- addAttribute() : $this
- Adds an attribute group.
- getNode() : EnumCase
- Returns the built enum case node.
- setDocComment() : $this
- Sets doc comment for the constant.
- setValue() : $this
- Sets the value.
Properties
$attributeGroups
protected
array<string|int, AttributeGroup>
$attributeGroups
= []
$attributes
protected
mixed
$attributes
= []
$name
protected
mixed
$name
$value
protected
mixed
$value
= null
Methods
__construct()
Creates an enum case builder.
public
__construct(string|Identifier $name) : mixed
Parameters
- $name : string|Identifier
-
Name
Return values
mixed —addAttribute()
Adds an attribute group.
public
addAttribute(Attribute|AttributeGroup $attribute) : $this
Parameters
- $attribute : Attribute|AttributeGroup
Return values
$this —The builder instance (for fluid interface)
getNode()
Returns the built enum case node.
public
getNode() : EnumCase
Return values
EnumCase —The built constant node
setDocComment()
Sets doc comment for the constant.
public
setDocComment(Doc|string $docComment) : $this
Parameters
- $docComment : Doc|string
-
Doc comment to set
Return values
$this —The builder instance (for fluid interface)
setValue()
Sets the value.
public
setValue(Expr|string|int $value) : $this
Parameters
- $value : Expr|string|int