Constant
in package
implements
Element, MetaDataContainer, AttributeContainer
uses
MetadataContainer, HasAttributes
FinalYes
Descriptor representing a constant
Table of Contents
Interfaces
- Element
- MetaDataContainer
- AttributeContainer
Properties
- $attributes : array<string|int, Attribute>
- $docBlock : DocBlock|null
- $endLocation : Location
- $final : bool
- $fqsen : Fqsen
- $location : Location
- $value : string|null
- $visibility : Visibility
Methods
- __construct() : mixed
- Initializes the object.
- addAttribute() : void
- getAttributes() : array<string|int, Attribute>
- getDocBlock() : DocBlock|null
- Returns DocBlock of this constant if available.
- getEndLocation() : Location
- getFqsen() : Fqsen
- Returns the Fqsen of the element.
- getLocation() : Location
- getName() : string
- Returns the name of the element.
- getValue() : string|null
- Returns the value of this constant.
- getVisibility() : Visibility
- isFinal() : bool
Properties
$attributes
private
array<string|int, Attribute>
$attributes
= []
$docBlock read-only
private
DocBlock|null
$docBlock
= null
$endLocation read-only
private
Location
$endLocation
$final read-only
private
bool
$final
= false
$fqsen read-only
private
Fqsen
$fqsen
$location read-only
private
Location
$location
$value read-only
private
string|null
$value
= null
$visibility read-only
private
Visibility
$visibility
Methods
__construct()
Initializes the object.
public
__construct(Fqsen $fqsen[, DocBlock|null $docBlock = null ][, string|null $value = null ][, Location|null $location = null ][, Location|null $endLocation = null ][, Visibility|null $visibility = null ][, bool $final = false ]) : mixed
Parameters
- $fqsen : Fqsen
- $docBlock : DocBlock|null = null
- $value : string|null = null
- $location : Location|null = null
- $endLocation : Location|null = null
- $visibility : Visibility|null = null
- $final : bool = false
addAttribute()
public
addAttribute(Attribute $attribute) : void
Parameters
- $attribute : Attribute
getAttributes()
public
getAttributes() : array<string|int, Attribute>
Return values
array<string|int, Attribute>getDocBlock()
Returns DocBlock of this constant if available.
public
getDocBlock() : DocBlock|null
Return values
DocBlock|nullgetEndLocation()
public
getEndLocation() : Location
Return values
LocationgetFqsen()
Returns the Fqsen of the element.
public
getFqsen() : Fqsen
Attributes
- #[Override]
Return values
FqsengetLocation()
public
getLocation() : Location
Return values
LocationgetName()
Returns the name of the element.
public
getName() : string
Attributes
- #[Override]
Return values
stringgetValue()
Returns the value of this constant.
public
getValue() : string|null
Return values
string|nullgetVisibility()
public
getVisibility() : Visibility
Return values
VisibilityisFinal()
public
isFinal() : bool