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
$attributes
private
array<string|int, Attribute>
$attributes
= []
$backedType read-only
private
Type|null
$backedType
$cases
private
array<string|int, EnumCase>
$cases
= []
$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
$methods
private
array<string, Method>
$methods
= []
$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
addAttribute()
public
addAttribute(Attribute $attribute) : void
Parameters
- $attribute : Attribute
addCase()
public
addCase(EnumCase $case) : void
Parameters
- $case : EnumCase
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
getAttributes()
public
getAttributes() : array<string|int, Attribute>
Return values
array<string|int, Attribute>getBackedType()
public
getBackedType() : Type|null
Return values
Type|nullgetCases()
public
getCases() : array<string|int, EnumCase>
Return values
array<string|int, EnumCase>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|nullgetEndLocation()
public
getEndLocation() : Location
Return values
LocationgetFqsen()
public
getFqsen() : Fqsen
Attributes
- #[Override]
Return values
FqsengetInterfaces()
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
LocationgetMethods()
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
stringgetUsedTraits()
Returns the traits used by this enum.
public
getUsedTraits() : array<string|int, Fqsen>