Menu

## Enum_ extends Declaration
in package

Enum_.php : 12

### Table of Contents

$attributeGroups : array<string|int, AttributeGroup>
$attributes : mixed
$constants : mixed
$enumCases : mixed
$implements : mixed
$methods : mixed
$name : mixed
$scalarType : mixed
$uses : mixed
__construct() : mixed
  Creates an enum builder.
addAttribute() : $this
  Adds an attribute group.
addStmt() : $this
  Adds a statement.
addStmts() : $this
  Adds multiple statements.
getNode() : Enum_
  Returns the built class node.
implement() : $this
  Implements one or more interfaces.
setDocComment() : $this
  Sets doc comment for the declaration.
setScalarType() : $this
  Sets the scalar type.

### Properties

#### $attributeGroups

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

#### $attributes

Declaration.php : 10
`protected mixed $attributes = []`

#### $constants

Enum_.php : 21
`protected mixed $constants = []`

#### $enumCases

Enum_.php : 20
`protected mixed $enumCases = []`

#### $implements

Enum_.php : 17
`protected mixed $implements = []`

#### $methods

Enum_.php : 22
`protected mixed $methods = []`

#### $name

Enum_.php : 14
`protected mixed $name`

#### $scalarType

Enum_.php : 15
`protected mixed $scalarType = null`

#### $uses

Enum_.php : 19
`protected mixed $uses = []`

### Methods

#### __construct()

Enum_.php : 32

Creates an enum builder.

`public __construct(string $name) : mixed`

##### Parameters

$name : string

  Name of the enum

##### Return values

mixed —

#### addAttribute()

Enum_.php : 98

Adds an attribute group.

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

##### Parameters

$attribute : Attribute|AttributeGroup

##### Return values

$this —

The builder instance (for fluid interface)

#### addStmt()

Enum_.php : 71

Adds a statement.

`public addStmt(Stmt|Builder $stmt) : $this`

##### Parameters

$stmt : Stmt|Builder

  The statement to add

##### Return values

$this —

The builder instance (for fluid interface)

#### addStmts()

Declaration.php : 21

Adds multiple statements.

`public addStmts(array<string|int, mixed> $stmts) : $this`

##### Parameters

$stmts : array<string|int, mixed>

  The statements to add

##### Return values

$this —

The builder instance (for fluid interface)

#### getNode()

Enum_.php : 109

Returns the built class node.

`public getNode() : Enum_`

##### Return values

Enum_ —

The built enum node

#### implement()

Enum_.php : 56

Implements one or more interfaces.

`public implement(Name|string ...$interfaces) : $this`

##### Parameters

$interfaces : Name|string

  Names of interfaces to implement

##### Return values

$this —

The builder instance (for fluid interface)

#### setDocComment()

Declaration.php : 36

Sets doc comment for the declaration.

`public setDocComment(Doc|string $docComment) : $this`

##### Parameters

$docComment : Doc|string

  Doc comment to set

##### Return values

$this —

The builder instance (for fluid interface)

#### setScalarType()

Enum_.php : 43

Sets the scalar type.

`public setScalarType(mixed $scalarType) : $this`

##### Parameters

$scalarType : mixed

##### Return values

$this —

## Search results