ClassDescriptor

in package
extends DescriptorAbstract Implements ClassInterface

Descriptor representing a Class.

Interfaces, Classes & Used Traits

ClassInterface
Common interface representing the description of a class.

Properties

protected$fqsen  : \phpDocumentor\Reflection\Fqsen                

protected$namespace  : \phpDocumentor\Descriptor\NamespaceDescriptor|string                

protected$package  : \phpDocumentor\Descriptor\PackageDescriptor                

protected$summary  : string                

protected$description  : string                

protected$fileDescriptor  : \phpDocumentor\Descriptor\FileDescriptor|null                

protected$tags  : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor>>                

protected$errors  : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error>                

protected$inheritedElement  : \phpDocumentor\Descriptor\DescriptorAbstract|null                

protected$parent  : \phpDocumentor\Descriptor\ClassDescriptor|\phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Reflection\Fqsen|string|null                

Reference to an instance of the superclass for this class, if any.

protected$implements  : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Reflection\Fqsen>                

References to interfaces that are implemented by this class.

protected$abstract  : bool                

protected$final  : bool                

protected$constants  : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ConstantDescriptor>                

protected$properties  : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\PropertyDescriptor>                

protected$methods  : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\MethodDescriptor>                

protected$usedTraits  : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TraitDescriptor>|\phpDocumentor\Descriptor\Collection<\phpDocumentor\Reflection\Fqsen>                

Methods

Initializes the all properties representing a collection with a new Collection object.

public__construct() : mixed

Returns

mixed

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

publicsetFullyQualifiedStructuralElementName(Fqsen $name) : void

Parameters

$name : Fqsen

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

publicgetFullyQualifiedStructuralElementName() : Fqsen|null

Returns

Fqsen|null

Sets the local name for this element.

publicsetName(string $name) : void

Parameters

$name : string

Returns the local name for this element.

publicgetName() : string

Returns

string

Sets the namespace (name) for this element.

publicsetNamespace(NamespaceDescriptor|string $namespace) : void

Parameters

$namespace : NamespaceDescriptor|string

Returns the namespace for this element (defaults to global "\")

publicgetNamespace() : NamespaceDescriptor|string

Sets the summary describing this element in short.

publicsetSummary(string $summary) : void

Parameters

$summary : string

Returns the summary which describes this element.

publicgetSummary() : string

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

Returns

string

Sets a description for this element.

publicsetDescription(string $description) : void

Parameters

$description : string

Returns the description for this element.

publicgetDescription() : string

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

Returns

string

Sets the file and linenumber where this element is at.

publicsetLocation(FileDescriptor $file, int $line) : void

Parameters

$file : FileDescriptor
$line : int

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

publicgetPath() : string

Returns

string

Returns the file in which this element resides or null in case the element is not bound to a file.

publicgetFile() : FileDescriptor|null

Sets the file to which this element is associated.

publicsetFile(FileDescriptor $file) : void

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

publicgetLine() : int

Returns

int

Sets the line number for this element's location in the source file.

publicsetLine(int $lineNumber) : void

Parameters

$lineNumber : int

Sets the tags associated with this element.

publicsetTags(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor>> $tags) : void

Parameters

$tags : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor>>

Returns the tags associated with this element.

publicgetTags() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor>>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor>>

Sets the name of the package to which this element belongs.

publicsetPackage(mixed $package) : void

Parameters

$package : mixed
inheritDoc

Returns the package name for this element.

publicgetPackage() : PackageDescriptor|null

publicgetAuthor() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Tag\AuthorDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Tag\AuthorDescriptor>

Returns the versions for this element.

publicgetVersion() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\VersionDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\VersionDescriptor>

Returns the copyrights for this element.

publicgetCopyright() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor>

Checks whether this element is deprecated.

publicisDeprecated() : bool

Returns

bool

Sets a list of all errors associated with this element.

publicsetErrors(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error> $errors) : void

Parameters

$errors : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error>

Returns all errors that occur in this element.

publicgetErrors() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error>

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

public__call(string $name, array $arguments) : Collection|mixed|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

Returns

Collection|mixed|null

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

public__toString() : string

Returns

string

publicgetInheritedElement() : ClassDescriptor|Fqsen|null

Returns

ClassDescriptor|Fqsen|null

publicsetParent(ClassDescriptor|InterfaceDescriptor|Fqsen|string|null $parents) : void

Parameters

$parents : ClassDescriptor|InterfaceDescriptor|Fqsen|string|null

publicgetParent() : ClassDescriptor|InterfaceDescriptor|Fqsen|string|null

Returns

ClassDescriptor|InterfaceDescriptor|Fqsen|string|null

publicsetInterfaces(Collection $implements) : void

Parameters

$implements : Collection

publicgetInterfaces() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Reflection\Fqsen>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Reflection\Fqsen>

publicsetFinal(bool $final) : void

Parameters

$final : bool

publicisFinal() : bool

Returns

bool

publicsetAbstract(bool $abstract) : void

Parameters

$abstract : bool

publicisAbstract() : bool

Returns

bool

publicsetConstants(Collection $constants) : void

Parameters

$constants : Collection

publicgetConstants() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ConstantDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ConstantDescriptor>

publicgetInheritedConstants() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ConstantDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ConstantDescriptor>

publicsetMethods(Collection $methods) : void

Parameters

$methods : Collection

publicgetMethods() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\MethodDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\MethodDescriptor>

publicgetInheritedMethods() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\MethodDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\MethodDescriptor>

publicgetMagicMethods() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\MethodDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\MethodDescriptor>

publicsetProperties(Collection $properties) : void

Parameters

$properties : Collection

publicgetProperties() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\PropertyDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\PropertyDescriptor>

publicgetInheritedProperties() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\PropertyDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\PropertyDescriptor>

publicgetMagicProperties() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\PropertyDescriptor>

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\PropertyDescriptor>

Sets a collection of all traits used by this class.

publicsetUsedTraits(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TraitDescriptor>|\phpDocumentor\Descriptor\Collection<\phpDocumentor\Reflection\Fqsen> $usedTraits) : void

Parameters

$usedTraits : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TraitDescriptor>|\phpDocumentor\Descriptor\Collection<\phpDocumentor\Reflection\Fqsen>

Returns the traits used by this class.

publicgetUsedTraits() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TraitDescriptor>|\phpDocumentor\Descriptor\Collection<\phpDocumentor\Reflection\Fqsen>

Returned values may either be a string (when the Trait is not in this project) or a TraitDescriptor.

Returns

\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TraitDescriptor>|\phpDocumentor\Descriptor\Collection<\phpDocumentor\Reflection\Fqsen>