ClassDescriptor
extends DescriptorAbstract
in package
implements
ClassInterface
Descriptor representing a Class.
Interfaces, Classes and Traits
- ClassInterface
- Common interface representing the description of a class.
Table of Contents
- $abstract : bool
- $constants : Collection<string|int, ConstantDescriptor>
- $description : DescriptionDescriptor|null
- $errors : Collection<string|int, Error>
- $fileDescriptor : FileDescriptor|null
- $final : bool
- $fqsen : Fqsen
- $implements : Collection<string|int, \phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Reflection\Fqsen>
- References to interfaces that are implemented by this class.
- $inheritedElement : DescriptorAbstract|null
- $line : int
- $methods : Collection<string|int, MethodDescriptor>
- $name : string
- $namespace : NamespaceDescriptor|string
- $package : PackageDescriptor|string
- $parent : ClassDescriptor|Fqsen|string|null
- Reference to an instance of the superclass for this class, if any.
- $properties : Collection<string|int, PropertyDescriptor>
- $summary : string
- $tags : Collection<string|int, Collection<string|int, TagDescriptor>>
- $usedTraits : Collection<string|int, TraitDescriptor>|Collection<string|int, Fqsen>
- __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>
- getConstants() : Collection<string|int, ConstantDescriptor>
- 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|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, ConstantDescriptor>
- getInheritedElement() : ClassDescriptor|Fqsen|string|null
- getInheritedMethods() : Collection<string|int, MethodDescriptor>
- getInheritedProperties() : Collection<string|int, PropertyDescriptor>
- getInterfaces() : Collection<string|int, \phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Reflection\Fqsen>
- getLine() : int
- Returns the line number where the definition for this element can be found.
- getMagicMethods() : Collection<string|int, MethodDescriptor>
- getMagicProperties() : Collection<string|int, PropertyDescriptor>
- getMethods() : Collection<string|int, MethodDescriptor>
- 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|Fqsen|string|null
- getPath() : string
- Returns the path to the file containing this element relative to the project's root.
- getProperties() : Collection<string|int, PropertyDescriptor>
- 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, TraitDescriptor>|Collection<string|int, Fqsen>
- Returns the traits used by this class.
- getVersion() : Collection<string|int, VersionDescriptor>
- Returns the versions for this element.
- isAbstract() : bool
- isDeprecated() : bool
- Checks whether this element is deprecated.
- isFinal() : bool
- setPackage() : void
- setUsedTraits() : void
- Sets a collection of all traits used by this class.
Properties
$abstract
protected
bool
$abstract
= false
Whether this is an abstract class.
$constants
protected
Collection<string|int, ConstantDescriptor>
$constants
References to constants defined in this class.
$description
protected
DescriptionDescriptor|null
$description
A more extensive description of this element.
$errors
protected
Collection<string|int, Error>
$errors
A list of errors found while building this element.
$fileDescriptor
protected
FileDescriptor|null
$fileDescriptor
The file to which this element belongs; if applicable
$final
protected
bool
$final
= false
Whether this class is marked as final and can't be subclassed.
$fqsen
protected
Fqsen
$fqsen
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, \phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Reflection\Fqsen>
$implements
$inheritedElement
protected
DescriptorAbstract|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, MethodDescriptor>
$methods
References to methods defined in this class.
$name
protected
string
$name
= ''
The local name for this element
$namespace
protected
NamespaceDescriptor|string
$namespace
= ''
The namespace for this element
$package
protected
PackageDescriptor|string
$package
The package with which this element is associated
$parent
Reference to an instance of the superclass for this class, if any.
protected
ClassDescriptor|Fqsen|string|null
$parent
$properties
protected
Collection<string|int, PropertyDescriptor>
$properties
References to properties defined in this class.
$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, TraitDescriptor>|Collection<string|int, Fqsen>
$usedTraits
References to traits consumed by this class
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
Return values
mixed —__toString()
Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
public
__toString() : string
Return values
string —getAuthor()
public
getAuthor() : Collection<string|int, AuthorDescriptor>
Return values
Collection<string|int, AuthorDescriptor> —getConstants()
public
getConstants() : Collection<string|int, ConstantDescriptor>
Return values
Collection<string|int, ConstantDescriptor> —getCopyright()
Returns the copyrights for this element.
public
getCopyright() : Collection<string|int, TagDescriptor>
Return values
Collection<string|int, TagDescriptor> —getDescription()
Returns the description for this element.
public
getDescription() : DescriptionDescriptor|null
This method will automatically attempt to inherit the parent's description if this one has none.
Return values
DescriptionDescriptor|null —getErrors()
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() : FileDescriptor|null
.
Return values
FileDescriptor|null —getFullyQualifiedStructuralElementName()
Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
public
getFullyQualifiedStructuralElementName() : Fqsen|null
Return values
Fqsen|null —getInheritedConstants()
public
getInheritedConstants() : Collection<string|int, ConstantDescriptor>
Return values
Collection<string|int, ConstantDescriptor> —getInheritedElement()
public
getInheritedElement() : ClassDescriptor|Fqsen|string|null
Return values
ClassDescriptor|Fqsen|string|null —getInheritedMethods()
public
getInheritedMethods() : Collection<string|int, MethodDescriptor>
Return values
Collection<string|int, MethodDescriptor> —getInheritedProperties()
public
getInheritedProperties() : Collection<string|int, PropertyDescriptor>
Return values
Collection<string|int, PropertyDescriptor> —getInterfaces()
public
getInterfaces() : Collection<string|int, \phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Reflection\Fqsen>
Return values
Collection<string|int, \phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Reflection\Fqsen> —getLine()
Returns the line number where the definition for this element can be found.
public
getLine() : int
Return values
int —getMagicMethods()
public
getMagicMethods() : Collection<string|int, MethodDescriptor>
Return values
Collection<string|int, MethodDescriptor> —getMagicProperties()
public
getMagicProperties() : Collection<string|int, PropertyDescriptor>
Return values
Collection<string|int, PropertyDescriptor> —getMethods()
public
getMethods() : Collection<string|int, MethodDescriptor>
Return values
Collection<string|int, MethodDescriptor> —getName()
Returns the local name for this element.
public
getName() : string
Return values
string —getNamespace()
Returns the namespace for this element (defaults to global "\")
public
getNamespace() : NamespaceDescriptor|string
Return values
NamespaceDescriptor|string —getPackage()
Returns the package name for this element.
public
getPackage() : PackageDescriptor|null
Return values
PackageDescriptor|null —getParent()
public
getParent() : ClassDescriptor|Fqsen|string|null
Return values
ClassDescriptor|Fqsen|string|null —getPath()
Returns the path to the file containing this element relative to the project's root.
public
getPath() : string
Return values
string —getProperties()
public
getProperties() : Collection<string|int, PropertyDescriptor>
Return values
Collection<string|int, PropertyDescriptor> —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 —getTags()
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, TraitDescriptor>|Collection<string|int, Fqsen>
Returned values may either be a string (when the Trait is not in this project) or a TraitDescriptor.
Return values
Collection<string|int, TraitDescriptor>|Collection<string|int, Fqsen> —getVersion()
Returns the versions for this element.
public
getVersion() : Collection<string|int, VersionDescriptor>
Return values
Collection<string|int, VersionDescriptor> —isAbstract()
public
isAbstract() : bool
Return values
bool —isDeprecated()
Checks whether this element is deprecated.
public
isDeprecated() : bool
Return values
bool —isFinal()
public
isFinal() : bool
Return values
bool —setPackage()
public
setPackage(mixed $package) : void
Parameters
- $package : mixed
Tags
Return values
void —setUsedTraits()
Sets a collection of all traits used by this class.
public
setUsedTraits(Collection<string|int, TraitDescriptor>|Collection<string|int, Fqsen> $usedTraits) : void
Parameters
- $usedTraits : Collection<string|int, TraitDescriptor>|Collection<string|int, Fqsen>