Documentation

EnumCase
in package
implements Builder

Interfaces, Classes and Traits

Builder

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

$attributes

protected mixed $attributes = []

Methods

__construct()

Creates an enum case builder.

public __construct(string|Identifier $name) : mixed
Parameters
$name : string|Identifier

Name

Return values
mixed

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
Return values
$this

Search results