phpDocumentor

ClassDescriptor extends DescriptorAbstract
in package
implements ClassInterface, AttributedInterface uses CanBeFinal, CanBeAbstract, HasMethods, HasProperties, HasConstants, ExtendsClass, ImplementsInterfaces, UsesTraits, HasAttributes

Descriptor representing a Class.

Table of Contents

Interfaces

ClassInterface
Common interface representing the description of a class.
AttributedInterface

Properties

$abstract  : bool
$attributes  : Collection<string|int, AttributeInterface>
$constants  : Collection<string|int, ConstantInterface>
$description  : DescriptionDescriptor|null
$endLocation  : Location|null
$errors  : Collection<string|int, Error>
$fileDescriptor  : FileInterface|null
$final  : bool
$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
$parent  : ClassInterface|Fqsen|string|null
Reference to an instance of the superclass for this class, if any.
$properties  : Collection<string|int, PropertyInterface>
$readOnly  : bool
$startLocation  : Location|null
$summary  : string
$tags  : Collection<string|int, Collection<string|int, TagDescriptor>>
$usedTraits  : Collection<string|int, TraitInterface|Fqsen>
$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 this descriptor.
__toString()  : string
Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
getAttributes()  : Collection<string|int, AttributeInterface>
getAuthor()  : Collection<string|int, AuthorDescriptor>
getConstants()  : Collection<string|int, ConstantInterface>
getCopyright()  : Collection<string|int, TagDescriptor>
Returns the copyrights for this element.
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()  : ClassInterface|Fqsen|string|null
Returns the element from which this element inherits, or null if it doesn't inherit any information.
getInheritedMethods()  : Collection<string|int, MethodInterface>
getInheritedProperties()  : Collection<string|int, PropertyInterface>
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>
getMagicProperties()  : Collection<string|int, PropertyInterface>
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.
getParent()  : ClassInterface|Fqsen|string|null
getPath()  : string
Returns the path to the file containing this element relative to the project's root.
getProperties()  : Collection<string|int, PropertyInterface>
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.
isAbstract()  : bool
isDeprecated()  : bool
Checks whether this element is deprecated.
isFinal()  : bool
isReadOnly()  : bool
setDescription()  : void
Sets a description or none to inherit from a parent.
setMetadata()  : 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.

$endLocation

protected Location|null $endLocation = null

$fileDescriptor

protected FileInterface|null $fileDescriptor = null

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|null $fqsen = null

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

$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.

$readOnly

protected bool $readOnly = false

Whether this class is marked as readonly.

$startLocation

protected Location|null $startLocation = null

$summary

protected string $summary = ''

A summary describing the function of this element in short.

$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

__toString()

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

public __toString() : string
Return values
string

getEndLocation()

Returns the end location where the definition for this element can be found.

public getEndLocation() : Location|null
Return values
Location|null

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|null

getFullyQualifiedStructuralElementName()

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

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

getInheritedElement()

Returns the element from which this element inherits, or null if it doesn't inherit any information.

public getInheritedElement() : ClassInterface|Fqsen|string|null
Return values
ClassInterface|Fqsen|string|null

getLine()

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

public getLine() : int
Tags
deprecated

use getStartLocation()->getLineNumber() instead

Return values
int

getMetadata()

public getMetadata() : array<string|int, Metadata>
Return values
array<string|int, Metadata>

getName()

Returns the 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

getStartLocation()

Returns the start location where the definition for this element can be found.

public getStartLocation() : Location|null
Return values
Location|null

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

isDeprecated()

Checks whether this element is deprecated.

public isDeprecated() : bool
Return values
bool

isFinal()

public isFinal() : bool
Return values
bool

setMetadata()

public setMetadata(array<string|int, Metadata$metadata) : void
Parameters
$metadata : array<string|int, Metadata>

        
On this page

Search results