FileDescriptor
Represents a file in the project.
Interfaces, Classes & Used Traits
- FileInterface
- Describes the public interface for a description of a File.
Properties
$fqsen inherited
protected$fqsen : \phpDocumentor\Reflection\Fqsen
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$name inherited
protected$name : string
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$namespace inherited
protected$namespace : \phpDocumentor\Descriptor\NamespaceDescriptor|string
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$package inherited
protected$package : \phpDocumentor\Descriptor\PackageDescriptor
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$summary inherited
protected$summary : string
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$description inherited
protected$description : string
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$fileDescriptor inherited
protected$fileDescriptor : \phpDocumentor\Descriptor\FileDescriptor|null
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$line inherited
protected$line : int
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$tags inherited
protected$tags : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor>>
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$errors inherited
protected$errors : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error>
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$inheritedElement inherited
protected$inheritedElement : \phpDocumentor\Descriptor\DescriptorAbstract|null
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
$hash Line 25
protected$hash : string
$path Line 28
protected$path : string
$source Line 31
protected$source : string|null
$namespaceAliases Line 34
protected$namespaceAliases : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\NamespaceDescriptor>
$includes Line 37
protected$includes : \phpDocumentor\Descriptor\Collection<string>
$constants Line 40
protected$constants : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ConstantDescriptor>
$functions Line 43
protected$functions : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\FunctionDescriptor>
$classes Line 46
protected$classes : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ClassDescriptor>
$interfaces Line 49
protected$interfaces : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\InterfaceDescriptor>
$traits Line 52
protected$traits : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TraitDescriptor>
$markers Line 55
protected$markers : \phpDocumentor\Descriptor\Collection<array<int|string,mixed>>
Methods
__construct() Line 62
Initializes a new file descriptor with the given hash of its contents.
public__construct(string $hash) : mixed
Parameters
An MD5 hash of the contents if this file.
Returns
mixed —
setFullyQualifiedStructuralElementName() inherited
Sets the Fully Qualified Structural Element Name (FQSEN) for this element.
publicsetFullyQualifiedStructuralElementName(Fqsen $name) : void
getFullyQualifiedStructuralElementName() inherited
Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
publicgetFullyQualifiedStructuralElementName() : Fqsen|null
setNamespace() inherited
Sets the namespace (name) for this element.
publicsetNamespace(NamespaceDescriptor|string $namespace) : void
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
getNamespace() inherited
Returns the namespace for this element (defaults to global "\")
publicgetNamespace() : NamespaceDescriptor|string
setSummary() inherited
Sets the summary describing this element in short.
publicsetSummary(string $summary) : void
getSummary() inherited
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 —- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
setDescription() inherited
Sets a description for this element.
publicsetDescription(string $description) : void
getDescription() inherited
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 —- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
setLocation() inherited
Sets the file and linenumber where this element is at.
publicsetLocation(FileDescriptor $file, int $line) : void
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
Returns
string —
getFile() inherited
Returns the file in which this element resides or null in case the element is not bound to a file.
publicgetFile() : FileDescriptor|null
setFile() inherited
Sets the file to which this element is associated.
publicsetFile(FileDescriptor $file) : void
getLine() inherited
Returns the line number where the definition for this element can be found.
publicgetLine() : int
setLine() inherited
Sets the line number for this element's location in the source file.
publicsetLine(int $lineNumber) : void
setTags() inherited
Sets the tags associated with this element.
publicsetTags(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor>> $tags) : void
Parameters
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
getTags() inherited
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>> —- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
setPackage() inherited
Sets the name of the package to which this element belongs.
publicsetPackage(PackageDescriptor|string $package) : void
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
getPackage() inherited
Returns the package name for this element.
publicgetPackage() : PackageDescriptor|null
getAuthor() inherited
publicgetAuthor() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Tag\AuthorDescriptor>
Returns
\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Tag\AuthorDescriptor> —- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
getVersion() inherited
Returns the versions for this element.
publicgetVersion() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\VersionDescriptor>
Returns
\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\VersionDescriptor> —- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
getCopyright() inherited
Returns the copyrights for this element.
publicgetCopyright() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor>
Returns
\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TagDescriptor> —- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
setErrors() inherited
Sets a list of all errors associated with this element.
publicsetErrors(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error> $errors) : void
Parameters
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
getErrors() inherited
Returns all errors that occur in this element.
publicgetErrors() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error>
Returns
\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error> —- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
__call() inherited
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.
- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
__toString() Line 336
Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
public__toString() : string
Returns
string —
getInheritedElement() inherited
publicgetInheritedElement() : DescriptorAbstract|string|Fqsen|null
Returns
DescriptorAbstract|string|Fqsen|null —- Inherited from
- \phpDocumentor\Descriptor\DescriptorAbstract
Returns
string —Returns
string|null —
setSource() Line 106
Sets the source contents for this file.
publicsetSource(string|null $source) : void
Parameters
getNamespaceAliases() Line 116
Returns the namespace aliases that have been defined in this file.
publicgetNamespaceAliases() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\NamespaceDescriptor>
Returns
\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\NamespaceDescriptor> —
setNamespaceAliases() Line 126
Sets the collection of namespace aliases for this file.
publicsetNamespaceAliases(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\NamespaceDescriptor> $namespaceAliases) : void
Parameters
getIncludes() Line 136
Returns a list of all includes that have been declared in this file.
publicgetIncludes() : \phpDocumentor\Descriptor\Collection
Returns
\phpDocumentor\Descriptor\Collection
setIncludes() Line 146
Sets a list of all includes that have been declared in this file.
publicsetIncludes(\phpDocumentor\Descriptor\Collection$includes) : void
Parameters
getConstants() Line 156
Returns a list of constant descriptors contained in this file.
publicgetConstants() : Collection
setConstants() Line 166
Sets a list of constant descriptors contained in this file.
publicsetConstants(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ConstantDescriptor> $constants) : void
Parameters
getFunctions() Line 176
Returns a list of function descriptors contained in this file.
publicgetFunctions() : Collection
setFunctions() Line 186
Sets a list of function descriptors contained in this file.
publicsetFunctions(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\FunctionDescriptor> $functions) : void
Parameters
getClasses() Line 196
Returns a list of class descriptors contained in this file.
publicgetClasses() : Collection
setClasses() Line 206
Sets a list of class descriptors contained in this file.
publicsetClasses(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ClassDescriptor> $classes) : void
Parameters
getInterfaces() Line 216
Returns a list of interface descriptors contained in this file.
publicgetInterfaces() : Collection
setInterfaces() Line 226
Sets a list of interface descriptors contained in this file.
publicsetInterfaces(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\InterfaceDescriptor> $interfaces) : void
Parameters
getTraits() Line 236
Returns a list of trait descriptors contained in this file.
publicgetTraits() : Collection
setTraits() Line 246
Sets a list of trait descriptors contained in this file.
publicsetTraits(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\TraitDescriptor> $traits) : void
Parameters
getMarkers() Line 263
Returns a series of markers contained in this file.
publicgetMarkers() : \phpDocumentor\Descriptor\Collection>
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() Line 275
Sets a series of markers contained in this file.
publicsetMarkers(\phpDocumentor\Descriptor\Collection> $markers) : void
Parameters
getAllErrors() Line 285
Returns a list of all errors in this file and all its child elements.
publicgetAllErrors() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error>
Returns
\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Validation\Error> —
setPath() Line 323
Sets the file path for this file relative to the project's root.
publicsetPath(string $path) : void
Parameters
setHash() Line 90
Sets the hash of the contents for this file.
protectedsetHash(string $hash) : void