Guides

Enum_
in package
implements Element, MetaDataContainer, AttributeContainer uses MetadataContainer, HasAttributes

FinalYes

Descriptor representing an Enum.

Table of Contents

Interfaces

Element
MetaDataContainer
AttributeContainer

Properties

$attributes  : array<string|int, Attribute>
$backedType  : Type|null
$cases  : array<string|int, EnumCase>
$constants  : array<string|int, Constant>
$docBlock  : DocBlock|null
$endLocation  : Location
$fqsen  : Fqsen
$implements  : array<string, Fqsen>
$location  : Location
$methods  : array<string, Method>
$usedTraits  : array<string, Fqsen>

Methods

__construct()  : mixed
addAttribute()  : void
addCase()  : void
addConstant()  : void
Add Constant to this enum.
addInterface()  : void
Add an interface Fqsen this enum is implementing.
addMethod()  : void
Add a method to this enum.
addUsedTrait()  : void
Add trait fqsen used by this enum.
getAttributes()  : array<string|int, Attribute>
getBackedType()  : Type|null
getCases()  : array<string|int, EnumCase>
getConstants()  : array<string|int, Constant>
Returns the constants of this enum.
getDocBlock()  : DocBlock|null
getEndLocation()  : Location
getFqsen()  : Fqsen
getInterfaces()  : array<string|int, Fqsen>
Returns the interfaces this enum is implementing.
getLocation()  : Location
getMethods()  : array<string|int, Method>
Returns the methods of this enum.
getName()  : string
getUsedTraits()  : array<string|int, Fqsen>
Returns the traits used by this enum.

Properties

$backedType read-only

private Type|null $backedType

$constants

private array<string|int, Constant> $constants = []

References to constants defined in this enum.

$docBlock read-only

private DocBlock|null $docBlock = null

$endLocation read-only

private Location $endLocation

$fqsen read-only

private Fqsen $fqsen

Full Qualified Structural Element Name

$implements

private array<string, Fqsen> $implements = []

$location read-only

private Location $location

$usedTraits

private array<string, Fqsen> $usedTraits = []

Methods

__construct()

public __construct(Fqsen $fqsen, Type|null $backedType[, DocBlock|null $docBlock = null ][, Location|null $location = null ][, Location|null $endLocation = null ]) : mixed
Parameters
$fqsen : Fqsen
$backedType : Type|null
$docBlock : DocBlock|null = null
$location : Location|null = null
$endLocation : Location|null = null

addConstant()

Add Constant to this enum.

public addConstant(Constant $constant) : void
Parameters
$constant : Constant

addInterface()

Add an interface Fqsen this enum is implementing.

public addInterface(Fqsen $interface) : void
Parameters
$interface : Fqsen

addMethod()

Add a method to this enum.

public addMethod(Method $method) : void
Parameters
$method : Method

addUsedTrait()

Add trait fqsen used by this enum.

public addUsedTrait(Fqsen $fqsen) : void
Parameters
$fqsen : Fqsen

getBackedType()

public getBackedType() : Type|null
Return values
Type|null

getConstants()

Returns the constants of this enum.

public getConstants() : array<string|int, Constant>
Return values
array<string|int, Constant>

getDocBlock()

public getDocBlock() : DocBlock|null
Return values
DocBlock|null

getEndLocation()

public getEndLocation() : Location
Return values
Location

getFqsen()

public getFqsen() : Fqsen
Attributes
#[Override]
Return values
Fqsen

getInterfaces()

Returns the interfaces this enum is implementing.

public getInterfaces() : array<string|int, Fqsen>
Return values
array<string|int, Fqsen>

getLocation()

public getLocation() : Location
Return values
Location

getMethods()

Returns the methods of this enum.

public getMethods() : array<string|int, Method>
Return values
array<string|int, Method>

getName()

public getName() : string
Attributes
#[Override]
Return values
string

getUsedTraits()

Returns the traits used by this enum.

public getUsedTraits() : array<string|int, Fqsen>
Return values
array<string|int, Fqsen>

        
On this page

Search results