EnumDescriptor
extends DescriptorAbstract
in package
implements
EnumInterface
uses
ImplementsInterfaces, HasConstants, HasMethods, UsesTraits
Descriptor representing a Enum.
Table of Contents
Interfaces
- EnumInterface
- Common interface representing the description of a class.
Properties
- $constants : Collection<string|int, ConstantInterface>
- $description : DescriptionDescriptor|null
- $endLocation : Location|null
- $errors : Collection<string|int, Error>
- $fileDescriptor : FileInterface|null
- $fqsen : Fqsen|null
- $implements : Collection<string|int, InterfaceInterface|Fqsen>
- References to interfaces that are implemented by this class.
- $inheritedElement : ElementInterface|string|Fqsen|null
- $line : int
- $methods : Collection<string|int, MethodInterface>
- $name : string
- $namespace : NamespaceInterface|string
- $package : PackageInterface|string
- $startLocation : Location|null
- $summary : string
- $tags : Collection<string|int, Collection<string|int, TagDescriptor>>
- $usedTraits : Collection<string|int, TraitInterface|Fqsen>
- $backedType : Type|null
- $cases : Collection<string|int, EnumCaseInterface>
- $metadata : array<string|int, Metadata>
Methods
- __call() : Collection<string|int, TagDescriptor>|null
- Dynamically constructs a set of getters to retrieve tag (collections) with.
- __construct() : mixed
- Initializes the all properties representing a collection with a new Collection object.
- __toString() : string
- Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
- getAuthor() : Collection<string|int, AuthorDescriptor>
- getBackedType() : Type|null
- getCases() : Collection<string|int, EnumCaseInterface>
- getConstants() : Collection<string|int, ConstantInterface>
- getCopyright() : Collection<string|int, TagDescriptor>
- Returns the copyrights for this element.
- getDeprecations() : array<string|int, Deprecation>
- getDescription() : DescriptionDescriptor
- Returns the description for this element.
- getEndLocation() : Location|null
- Returns the end location where the definition for this element can be found.
- getErrors() : Collection<string|int, Error>
- Returns all errors that occur in this element.
- getFile() : FileInterface|null
- Returns the file in which this element resides or null in case the element is not bound to a file.
- getFullyQualifiedStructuralElementName() : Fqsen|null
- Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
- getInheritedConstants() : Collection<string|int, ConstantInterface>
- getInheritedElement() : ElementInterface|string|Fqsen|null
- Returns the element from which this element inherits, or null if it doesn't inherit any information.
- getInheritedMethods() : Collection<string|int, MethodInterface>
- getInterfaces() : Collection<string|int, InterfaceInterface|Fqsen>
- getInterfacesIncludingInherited() : Collection<string|int, InterfaceInterface|Fqsen>
- getLine() : int
- Returns the line number where the definition for this element can be found.
- getMagicMethods() : Collection<string|int, MethodInterface>
- getMetadata() : array<string|int, Metadata>
- getMethods() : Collection<string|int, MethodInterface>
- getName() : string
- Returns the name for this element.
- getNamespace() : NamespaceInterface|string
- Returns the namespace for this element (defaults to global "\")
- getPackage() : PackageInterface|null
- Returns the package name for this element.
- getPath() : string
- Returns the path to the file containing this element relative to the project's root.
- getStartLocation() : Location|null
- Returns the start location where the definition for this element can be found.
- getSummary() : string
- Returns the summary which describes this element.
- getTags() : Collection<string|int, Collection<string|int, TagDescriptor>>
- Returns the tags associated with this element.
- getUsedTraits() : Collection<string|int, TraitInterface|Fqsen>
- Returns the traits used by this class.
- getVersion() : Collection<string|int, VersionDescriptor>
- Returns the versions for this element.
- isDeprecated() : bool
- Checks whether this element is deprecated.
- setBackedType() : void
- setCases() : void
- setDescription() : void
- Sets a description or none to inherit from a parent.
- setLocation() : void
- Sets the file and location for this element.
- setMetadata() : void
- setPackage() : void
- setUsedTraits() : void
- Sets a collection of all traits used by this class.
- createDescription() : Description
- isDeprecatedByAttribute() : bool
- isDeprecatedByTag() : bool
Properties
$constants
protected
Collection<string|int, ConstantInterface>
$constants
References to constants defined in this class.
$description
protected
DescriptionDescriptor|null
$description
= null
$endLocation
protected
Location|null
$endLocation
= null
$errors
protected
Collection<string|int, Error>
$errors
A collection of errors found during filtering.
$fileDescriptor
protected
FileInterface|null
$fileDescriptor
= null
The file to which this element belongs; if applicable
$fqsen
protected
Fqsen|null
$fqsen
= null
Fully Qualified Structural Element Name; the FQCN including method, property or constant name
$implements
References to interfaces that are implemented by this class.
protected
Collection<string|int, InterfaceInterface|Fqsen>
$implements
$inheritedElement
protected
ElementInterface|string|Fqsen|null
$inheritedElement
= null
the element from which to inherit information in this element
$line
protected
int
$line
= 0
The line number on which this element occurs.
$methods
protected
Collection<string|int, MethodInterface>
$methods
References to methods defined in this class.
$name
protected
string
$name
= ''
$namespace
protected
NamespaceInterface|string
$namespace
= ''
The namespace for this element
$package
protected
PackageInterface|string
$package
The package with which this element is associated
$startLocation
protected
Location|null
$startLocation
= null
$summary
protected
string
$summary
= ''
A summary describing the function of this element in short.
$tags
protected
Collection<string|int, Collection<string|int, TagDescriptor>>
$tags
The tags associated with this element.
$usedTraits
protected
Collection<string|int, TraitInterface|Fqsen>
$usedTraits
References to traits consumed by this class
$backedType
private
Type|null
$backedType
= null
$cases
private
Collection<string|int, EnumCaseInterface>
$cases
$metadata
private
array<string|int, Metadata>
$metadata
= []
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 the all properties representing a collection with a new Collection object.
public
__construct() : mixed
__toString()
Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
public
__toString() : string
Return values
stringgetAuthor()
public
getAuthor() : Collection<string|int, AuthorDescriptor>
Return values
Collection<string|int, AuthorDescriptor>getBackedType()
public
getBackedType() : Type|null
Return values
Type|nullgetCases()
public
getCases() : Collection<string|int, EnumCaseInterface>
Return values
Collection<string|int, EnumCaseInterface>getConstants()
public
getConstants() : Collection<string|int, ConstantInterface>
Return values
Collection<string|int, ConstantInterface>getCopyright()
Returns the copyrights for this element.
public
getCopyright() : Collection<string|int, TagDescriptor>
Return values
Collection<string|int, TagDescriptor>getDeprecations()
public
getDeprecations() : array<string|int, Deprecation>
Return values
array<string|int, Deprecation>getDescription()
Returns the description for this element.
public
getDescription() : DescriptionDescriptor
This method will automatically attempt to inherit the parent's description if this one has none.
Return values
DescriptionDescriptorgetEndLocation()
Returns the end location where the definition for this element can be found.
public
getEndLocation() : Location|null
Return values
Location|nullgetErrors()
Returns all errors that occur in this element.
public
getErrors() : Collection<string|int, Error>
Return values
Collection<string|int, Error>getFile()
Returns the file in which this element resides or null in case the element is not bound to a file.
public
getFile() : FileInterface|null
.
Return values
FileInterface|nullgetFullyQualifiedStructuralElementName()
Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
public
getFullyQualifiedStructuralElementName() : Fqsen|null
Return values
Fqsen|nullgetInheritedConstants()
public
getInheritedConstants() : Collection<string|int, ConstantInterface>
Return values
Collection<string|int, ConstantInterface>getInheritedElement()
Returns the element from which this element inherits, or null if it doesn't inherit any information.
public
getInheritedElement() : ElementInterface|string|Fqsen|null
This method is usually overridden in consuming classes with the determination how that class should resolve inheritance. This is a placeholder function for those classes who need a simple way to provide inheritance.
Return values
ElementInterface|string|Fqsen|nullgetInheritedMethods()
public
getInheritedMethods() : Collection<string|int, MethodInterface>
Return values
Collection<string|int, MethodInterface>getInterfaces()
public
getInterfaces() : Collection<string|int, InterfaceInterface|Fqsen>
Return values
Collection<string|int, InterfaceInterface|Fqsen>getInterfacesIncludingInherited()
public
getInterfacesIncludingInherited() : Collection<string|int, InterfaceInterface|Fqsen>
Return values
Collection<string|int, InterfaceInterface|Fqsen>getLine()
Returns the line number where the definition for this element can be found.
public
getLine() : int
use getStartLocation()->getLineNumber() instead
Return values
intgetMagicMethods()
public
getMagicMethods() : Collection<string|int, MethodInterface>
Return values
Collection<string|int, MethodInterface>getMetadata()
public
getMetadata() : array<string|int, Metadata>
Return values
array<string|int, Metadata>getMethods()
public
getMethods() : Collection<string|int, MethodInterface>
Return values
Collection<string|int, MethodInterface>getName()
Returns the name for this element.
public
getName() : string
Return values
stringgetNamespace()
Returns the namespace for this element (defaults to global "\")
public
getNamespace() : NamespaceInterface|string
Return values
NamespaceInterface|stringgetPackage()
Returns the package name for this element.
public
getPackage() : PackageInterface|null
Return values
PackageInterface|nullgetPath()
Returns the path to the file containing this element relative to the project's root.
public
getPath() : string
Return values
stringgetStartLocation()
Returns the start location where the definition for this element can be found.
public
getStartLocation() : Location|null
Return values
Location|nullgetSummary()
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
stringgetTags()
Returns the tags associated with this element.
public
getTags() : Collection<string|int, Collection<string|int, TagDescriptor>>
Return values
Collection<string|int, Collection<string|int, TagDescriptor>>getUsedTraits()
Returns the traits used by this class.
public
getUsedTraits() : Collection<string|int, TraitInterface|Fqsen>
Returned values may either be a string (when the Trait is not in this project) or a TraitDescriptor.
Return values
Collection<string|int, TraitInterface|Fqsen>getVersion()
Returns the versions for this element.
public
getVersion() : Collection<string|int, VersionDescriptor>
Return values
Collection<string|int, VersionDescriptor>isDeprecated()
Checks whether this element is deprecated.
public
isDeprecated() : bool
Return values
boolsetBackedType()
public
setBackedType(Type|null $type) : void
Parameters
- $type : Type|null
setCases()
public
setCases(Collection<string|int, EnumCaseInterface> $cases) : void
Parameters
- $cases : Collection<string|int, EnumCaseInterface>
setDescription()
Sets a description or none to inherit from a parent.
public
setDescription(DescriptionDescriptor|null $description) : void
Parameters
- $description : DescriptionDescriptor|null
setLocation()
Sets the file and location for this element.
public
setLocation(FileInterface $file, Location $startLocation) : void
Parameters
- $file : FileInterface
- $startLocation : Location
setMetadata()
public
setMetadata(array<string|int, Metadata> $metadata) : void
Parameters
- $metadata : array<string|int, Metadata>
setPackage()
public
setPackage(mixed $package) : void
Parameters
- $package : mixed
Tags
setUsedTraits()
Sets a collection of all traits used by this class.
public
setUsedTraits(Collection<string|int, TraitInterface|Fqsen> $usedTraits) : void
Parameters
- $usedTraits : Collection<string|int, TraitInterface|Fqsen>
createDescription()
private
createDescription(string|null $param) : Description
Parameters
- $param : string|null
Return values
DescriptionisDeprecatedByAttribute()
private
isDeprecatedByAttribute() : bool
Tags
Return values
boolisDeprecatedByTag()
private
isDeprecatedByTag() : bool