FileDescriptor extends DescriptorAbstract implements FileInterface, Stringable
Represents a file in the project.
This class contains all structural elements of the file it represents. In most modern projects a file will contain a single element like a Class, Interface or Trait, sometimes multiple functions. Depending on the config settings of the parsed project it might include all source code from the file in the project.
Table of Contents
Interfaces
- FileInterface
- Describes the public interface for a description of a File.
- Stringable
Properties
- $classes : Collection<string|int, ClassInterface>
- $constants : Collection<string|int, ConstantInterface>
- $description : DescriptionDescriptor|null
- $endLocation : Location|null
- $errors : Collection<string|int, Error>
- $fileDescriptor : FileInterface|null
- $fqsen : Fqsen|null
- $functions : Collection<string|int, FunctionInterface>
- $hash : string
- $includes : Collection<string|int, string>
- $inheritedElement : ElementInterface|string|Fqsen|null
- $interfaces : Collection<string|int, InterfaceInterface>
- $line : int
- $markers : Collection<string|int, array<int|string, mixed>>
- $name : string
- $namespace : NamespaceInterface|string
- $namespaceAliases : Collection<string|int, NamespaceInterface|Fqsen>
- $package : PackageInterface|string
- $path : string
- $source : string|null
- $startLocation : Location|null
- $summary : string
- $tags : Collection<string|int, Collection<string|int, TagDescriptor>>
- $traits : Collection<string|int, TraitInterface>
- $enums : Collection<string|int, EnumInterface>
- $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 a new file descriptor with the given hash of its contents.
- __toString() : string
- Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
- getAllErrors() : Collection<string|int, Error>
- Returns a list of all errors in this file and all its child elements.
- getAuthor() : Collection<string|int, AuthorDescriptor>
- getClasses() : Collection<string|int, ClassInterface>
- Returns a list of class descriptors contained in this file.
- getConstants() : Collection<string|int, ConstantInterface>
- Returns a list of constant descriptors contained in this file.
- getCopyright() : Collection<string|int, TagDescriptor>
- Returns the copyrights for this element.
- getDeprecations() : array<string|int, Deprecation>
- getDescription() : DescriptionDescriptor
- Returns the description for this element.
- getEndLocation() : Location|null
- Returns the end location where the definition for this element can be found.
- getEnums() : Collection<string|int, EnumInterface>
- 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.
- getFunctions() : Collection<string|int, FunctionInterface>
- Returns a list of function descriptors contained in this file.
- getHash() : string
- Returns the hash of the contents for this file.
- getIncludes() : Collection<string|int, string>
- Returns a list of all includes that have been declared in this file.
- getInheritedElement() : ElementInterface|string|Fqsen|null
- Returns the element from which this element inherits, or null if it doesn't inherit any information.
- getInterfaces() : Collection<string|int, InterfaceInterface>
- Returns a list of interface descriptors contained in this file.