Properties

$fqsen

$fqsen : string

Type

string — Fully Qualified Structural Element Name; the FQCN including method, property of constant name

$name

$name : string

Type

string — The local name for this element

$package

$package : string

Type

string — The package with which this element is associated

$summary

$summary : string

Type

string — A summary describing the function of this element in short.

$description

$description : string

Type

string — A more extensive description of this element.

$line

$line : integer

Type

integer — The line number on which this element occurs.

$hash

$hash : string

Type

string

$path

$path : string

Type

string

$source

$source : string|null

Type

string|null

Methods

__construct()

__construct(string  $hash) 

Initializes a new file descriptor with the given hash of its contents.

Parameters

string $hash

An MD5 hash of the contents if this file.

setFullyQualifiedStructuralElementName()

setFullyQualifiedStructuralElementName(string  $name) : void

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

Parameters

string $name

getFullyQualifiedStructuralElementName()

getFullyQualifiedStructuralElementName() : string

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

Returns

string

setName()

setName(string  $name) : void

Sets the local name for this element.

Parameters

string $name

getName()

getName() : string

Returns the local name for this element.

Returns

string

getNamespace()

getNamespace() : \phpDocumentor\Descriptor\NamespaceDescriptor|string|null

Returns the namespace for this element or null if none is attached.

Returns

\phpDocumentor\Descriptor\NamespaceDescriptor|string|null

setSummary()

setSummary(string  $summary) : void

Sets the summary describing this element in short.

Parameters

string $summary

getSummary()

getSummary() : string

Returns the summary which describes this element.

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

Returns

string

setDescription()

setDescription(string  $description) : void

Sets a description for this element.

Parameters

string $description

getDescription()

getDescription() : string

Returns the description for this element.

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

Returns

string

setLocation()

setLocation(\phpDocumentor\Descriptor\FileDescriptor  $file, integer  $line) : void

Sets the file and linenumber where this element is at.

Parameters

\phpDocumentor\Descriptor\FileDescriptor $file
integer $line

getPath()

getPath() : string

Returns the file path relative to the project's root.

Returns

string

getFile()

getFile() : \phpDocumentor\Descriptor\FileDescriptor|null

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

.

Returns

\phpDocumentor\Descriptor\FileDescriptor|null

getLine()

getLine() : integer

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

Returns

integer

setLine()

setLine(integer  $lineNumber) : void

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

Parameters

integer $lineNumber

isDeprecated()

isDeprecated() : boolean

Checks whether this element is deprecated.

Returns

boolean

setErrors()

setErrors(\phpDocumentor\Descriptor\Collection  $errors) : void

Sets a list of all errors associated with this element.

Parameters

\phpDocumentor\Descriptor\Collection $errors

__call()

__call(string  $name, array<mixed,mixed>  $arguments) : \phpDocumentor\Descriptor\Collection|null

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

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

string $name
array<mixed,mixed> $arguments

Returns

\phpDocumentor\Descriptor\Collection|null

__toString()

__toString() : string

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

Returns

string

getHash()

getHash() : string

Returns the hash of the contents for this file.

Returns

string

getSource()

getSource() : string|null

Retrieves the contents of this file.

Returns

string|null

setSource()

setSource(string|null  $source) : void

Sets the source contents for this file.

Parameters

string|null $source

getNamespaceAliases()

getNamespaceAliases() : \phpDocumentor\Descriptor\Collection

Returns the namespace aliases that have been defined in this file.

Returns

\phpDocumentor\Descriptor\Collection

setNamespaceAliases()

setNamespaceAliases(\phpDocumentor\Descriptor\Collection  $namespaceAliases) : void

Sets the collection of namespace aliases for this file.

Parameters

\phpDocumentor\Descriptor\Collection $namespaceAliases

getIncludes()

getIncludes() : \phpDocumentor\Descriptor\Collection

Returns a list of all includes that have been declared in this file.

Returns

\phpDocumentor\Descriptor\Collection

setIncludes()

setIncludes(\phpDocumentor\Descriptor\Collection  $includes) : void

Sets a list of all includes that have been declared in this file.

Parameters

\phpDocumentor\Descriptor\Collection $includes

setConstants()

setConstants(\phpDocumentor\Descriptor\Collection  $constants) : void

Sets a list of constant descriptors contained in this file.

Parameters

\phpDocumentor\Descriptor\Collection $constants

getFunctions()

getFunctions() : \phpDocumentor\Descriptor\Collection|array<mixed,\phpDocumentor\Descriptor\FunctionInterface>

Returns a list of function descriptors contained in this file.

Returns

\phpDocumentor\Descriptor\Collection|array<mixed,\phpDocumentor\Descriptor\FunctionInterface>

setFunctions()

setFunctions(\phpDocumentor\Descriptor\Collection  $functions) : void

Sets a list of function descriptors contained in this file.

Parameters

\phpDocumentor\Descriptor\Collection $functions

getClasses()

getClasses() : \phpDocumentor\Descriptor\Collection|array<mixed,\phpDocumentor\Descriptor\ClassInterface>

Returns a list of class descriptors contained in this file.

Returns

\phpDocumentor\Descriptor\Collection|array<mixed,\phpDocumentor\Descriptor\ClassInterface>

setClasses()

setClasses(\phpDocumentor\Descriptor\Collection  $classes) : void

Sets a list of class descriptors contained in this file.

Parameters

\phpDocumentor\Descriptor\Collection $classes

getInterfaces()

getInterfaces() : \phpDocumentor\Descriptor\Collection|array<mixed,\phpDocumentor\Descriptor\InterfaceInterface>

Returns a list of interface descriptors contained in this file.

Returns

\phpDocumentor\Descriptor\Collection|array<mixed,\phpDocumentor\Descriptor\InterfaceInterface>

setInterfaces()

setInterfaces(\phpDocumentor\Descriptor\Collection  $interfaces) : void

Sets a list of interface descriptors contained in this file.

Parameters

\phpDocumentor\Descriptor\Collection $interfaces

getTraits()

getTraits() : \phpDocumentor\Descriptor\Collection|array<mixed,\phpDocumentor\Descriptor\TraitInterface>

Returns a list of trait descriptors contained in this file.

Returns

\phpDocumentor\Descriptor\Collection|array<mixed,\phpDocumentor\Descriptor\TraitInterface>

setTraits()

setTraits(\phpDocumentor\Descriptor\Collection  $traits) : void

Sets a list of trait descriptors contained in this file.

Parameters

\phpDocumentor\Descriptor\Collection $traits

getMarkers()

getMarkers() : \phpDocumentor\Descriptor\Collection

Returns a series of markers contained in this file.

A marker is a special inline comment that starts with a keyword and is followed by a single line description.

Example:

// TODO: This is an item that needs to be done.

Returns

\phpDocumentor\Descriptor\Collection

setMarkers()

setMarkers(\phpDocumentor\Descriptor\Collection  $markers) : void

Sets a series of markers contained in this file.

Parameters

\phpDocumentor\Descriptor\Collection $markers

getAllErrors()

getAllErrors() : \phpDocumentor\Descriptor\Collection

Returns a list of all errors in this file and all its child elements.

Returns

\phpDocumentor\Descriptor\Collection

setPath()

setPath(string  $path) : void

Sets the file path for this file relative to the project's root.

Parameters

string $path

setHash()

setHash(string  $hash) : void

Sets the hash of the contents for this file.

Parameters

string $hash