Guides

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

$docBlock read-only

private DocBlock|null $docBlock = null

$endLocation read-only

private Location $endLocation

$final read-only

private bool $final = false

$location read-only

private Location $location

$value read-only

private string|null $value = null

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

getDocBlock()

Returns DocBlock of this constant if available.

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

getEndLocation()

public getEndLocation() : Location
Return values
Location

getFqsen()

Returns the Fqsen of the element.

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

getLocation()

public getLocation() : Location
Return values
Location

getName()

Returns the name of the element.

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

getValue()

Returns the value of this constant.

public getValue() : string|null
Return values
string|null

isFinal()

public isFinal() : bool
Return values
bool

        
On this page

Search results