phpDocumentor

ConstantDescriptor extends DescriptorAbstract
in package
implements ConstantInterface, VisibilityInterface

Descriptor representing a constant

Interfaces, Classes and Traits

ConstantInterface
Descriptor representing a constant on a class, trait, property or file.
VisibilityInterface

Table of Contents

$description  : DescriptionDescriptor|null
$errors  : Collection<string|int, Error>
$fileDescriptor  : FileDescriptor|null
$fqsen  : Fqsen
$inheritedElement  : DescriptorAbstract|null
$line  : int
$name  : string
$namespace  : NamespaceDescriptor|string
$package  : PackageDescriptor|string
$parent  : ClassDescriptor|InterfaceDescriptor|null
$summary  : string
$tags  : Collection<string|int, Collection<string|int, TagDescriptor>>
$types  : Type|null
$value  : string
$visibility  : string
__call()  : Collection<string|int, TagDescriptor>|null
Dynamically constructs a set of getters to retrieve tag (collections) with.
__construct()  : mixed
Initializes this descriptor.
__toString()  : string
Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
getAuthor()  : Collection<string|int, AuthorDescriptor>
getCopyright()  : Collection<string|int, TagDescriptor>
Returns the copyrights for this element.
getDescription()  : DescriptionDescriptor|null
Returns the description for this element.
getErrors()  : Collection<string|int, Error>
Returns all errors that occur in this element.
getFile()  : FileDescriptor
Returns the file associated with the parent class, interface or trait when inside a container.
getFullyQualifiedStructuralElementName()  : Fqsen|null
Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
getInheritedElement()  : DescriptorAbstract|string|Fqsen|null
Returns the Constant from which this one should inherit, if any.
getLine()  : int
Returns the line number where the definition for this element can be found.
getName()  : string
Returns the local name for this element.
getNamespace()  : NamespaceDescriptor|string
Returns the namespace for this element (defaults to global "\")
getPackage()  : PackageDescriptor|null
Returns the package name for this element.
getParent()  : ClassDescriptor|InterfaceDescriptor|null
getPath()  : string
Returns the path to the file containing this element relative to the project's root.
getSummary()  : string
Returns the summary which describes this element.
getTags()  : Collection<string|int, Collection<string|int, TagDescriptor>>
Returns the tags associated with this element.
getType()  : Type|null
getTypes()  : list<string|int, Type>
Returns the types that may be present in this constant.
getValue()  : string
Retrieves a textual representation of the value in this constant.
getVar()  : Collection<string|int, VarDescriptor>
getVersion()  : Collection<string|int, VersionDescriptor>
Returns the versions for this element.
getVisibility()  : string
Returns the visibility for this element.
isDeprecated()  : bool
Checks whether this element is deprecated.
setParent()  : void
Registers a parent class or interface with this constant.
setTypes()  : void
Sets the types that this constant may contain.
setValue()  : void
Sets the value representation for this constant.
setVisibility()  : void

Properties

$fqsen

protected Fqsen $fqsen

Fully Qualified Structural Element Name; the FQCN including method, property or constant name

$summary

protected string $summary = ''

A summary describing the function of this element in short.

Methods

__call()

Dynamically constructs a set of getters to retrieve tag (collections) with.

public __call(string $name, array<string|int, mixed> $arguments) : Collection<string|int, TagDescriptor>|null

Important: __call() is not a fast method of access; it is preferred to directly use the getTags() collection. This interface is provided to allow for uniform and easy access to certain tags.

Parameters
$name : string
$arguments : array<string|int, mixed>
Return values
Collection<string|int, TagDescriptor>|null

__construct()

Initializes this descriptor.

public __construct() : mixed
Return values
mixed

__toString()

Represents this object by its unique identifier, the Fully Qualified Structural Element Name.

public __toString() : string
Return values
string

getFullyQualifiedStructuralElementName()

Returns the Fully Qualified Structural Element Name (FQSEN) for this element.

public getFullyQualifiedStructuralElementName() : Fqsen|null
Return values
Fqsen|null

getLine()

Returns the line number where the definition for this element can be found.

public getLine() : int
Return values
int

getName()

Returns the local name for this element.

public getName() : string
Return values
string

getPath()

Returns the path to the file containing this element relative to the project's root.

public getPath() : string
Return values
string

getSummary()

Returns the summary which describes this element.

public getSummary() : string

This method will automatically attempt to inherit the parent's summary if this one has none.

Return values
string

getTypes()

Returns the types that may be present in this constant.

public getTypes() : list<string|int, Type>
Return values
list<string|int, Type>

getValue()

Retrieves a textual representation of the value in this constant.

public getValue() : string
Return values
string

getVisibility()

Returns the visibility for this element.

public getVisibility() : string

The following values are supported:

  • public
  • protected
  • private
Return values
string

isDeprecated()

Checks whether this element is deprecated.

public isDeprecated() : bool
Return values
bool

setTypes()

Sets the types that this constant may contain.

public setTypes(Type $types) : void
Parameters
$types : Type
Return values
void

setValue()

Sets the value representation for this constant.

public setValue(string $value) : void
Parameters
$value : string
Return values
void

setVisibility()

public setVisibility(string $visibility) : void
Parameters
$visibility : string
Return values
void

Search results