NamespaceDescriptor
extends DescriptorAbstract
in package
implements
NamespaceInterface
Represents a namespace and its children for a project.
Interfaces, Classes and Traits
- NamespaceInterface
- Describes the public interface for the description of a namespace.
Table of Contents
- $children : Collection<string|int, NamespaceDescriptor>
- $classes : Collection<string|int, ClassDescriptor>
- $constants : Collection<string|int, ConstantDescriptor>
- $description : DescriptionDescriptor|null
- $errors : Collection<string|int, Error>
- $fileDescriptor : FileDescriptor|null
- $fqsen : Fqsen
- $functions : Collection<string|int, FunctionDescriptor>
- $inheritedElement : DescriptorAbstract|null
- $interfaces : Collection<string|int, InterfaceDescriptor>
- $line : int
- $name : string
- $namespace : NamespaceDescriptor|string
- $package : PackageDescriptor|string
- $parent : NamespaceDescriptor|null
- $summary : string
- $tags : Collection<string|int, Collection<string|int, TagDescriptor>>
- $traits : Collection<string|int, TraitDescriptor>
- __call() : Collection<string|int, TagDescriptor>|null
- Dynamically constructs a set of getters to retrieve tag (collections) with.
- __construct() : mixed
- Initializes the namespace with collections for its children.
- __toString() : string
- Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
- addChild() : void
- getAuthor() : Collection<string|int, AuthorDescriptor>
- getChildren() : Collection<string|int, NamespaceDescriptor>
- Returns a list of all namespaces contained in this namespace and its children.
- getClasses() : Collection<string|int, ClassDescriptor>
- Returns a list of all classes in this namespace.
- getConstants() : Collection<string|int, ConstantDescriptor>
- Returns a list of all constants in this namespace.
- getCopyright() : Collection<string|int, TagDescriptor>
- Returns the copyrights for this element.
- getDescription() : DescriptionDescriptor|null
- Returns the description for this element.
- getErrors() : Collection<string|int, Error>
- Returns all errors that occur in this element.
- getFile() : FileDescriptor|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, FunctionDescriptor>
- Returns a list of all functions in this namespace.
- getInheritedElement() : DescriptorAbstract|string|Fqsen|null
- getInterfaces() : Collection<string|int, InterfaceDescriptor>
- Returns a list of all interfaces in this namespace.
- getLine() : int
- Returns the line number where the definition for this element can be found.
- getName() : string
- Returns the local name for this element.
- getNamespace() : NamespaceDescriptor|string
- Returns the namespace for this element (defaults to global "\")
- getPackage() : PackageDescriptor|null
- Returns the package name for this element.
- getParent() : NamespaceDescriptor|null
- Returns the parent namespace for this namespace.
- getPath() : string
- Returns the path to the file containing this element relative to the project's root.
- getSummary() : string
- Returns the summary which describes this element.
- getTags() : Collection<string|int, Collection<string|int, TagDescriptor>>
- Returns the tags associated with this element.
- getTraits() : Collection<string|int, TraitDescriptor>
- Returns a list of all traits in this namespace.
- getVersion() : Collection<string|int, VersionDescriptor>
- Returns the versions for this element.
- isDeprecated() : bool
- Checks whether this element is deprecated.
- setChildren() : void
- Sets a list of all child namespaces in this namespace.
- setClasses() : void
- Sets a list of all classes in this project.
- setConstants() : void
- Sets a list of all constants in this namespace.
- setFunctions() : void
- Sets a list of all functions in this namespace.
- setInterfaces() : void
- Sets a list of all interfaces in this namespace.
- setParent() : void
- Sets the parent namespace for this namespace.
- setTraits() : void
- Sets a list of all traits contained in this namespace.
Properties
$children
protected
Collection<string|int, NamespaceDescriptor>
$children
$classes
protected
Collection<string|int, ClassDescriptor>
$classes
$constants
protected
Collection<string|int, ConstantDescriptor>
$constants
$description
protected
DescriptionDescriptor|null
$description
A more extensive description of this element.
$errors
protected
Collection<string|int, Error>
$errors
A list of errors found while building this element.
$fileDescriptor
protected
FileDescriptor|null
$fileDescriptor
The file to which this element belongs; if applicable
$fqsen
protected
Fqsen
$fqsen
Fully Qualified Structural Element Name; the FQCN including method, property or constant name
$functions
protected
Collection<string|int, FunctionDescriptor>
$functions
$inheritedElement
protected
DescriptorAbstract|null
$inheritedElement
= null
the element from which to inherit information in this element
$interfaces
protected
Collection<string|int, InterfaceDescriptor>
$interfaces
$line
protected
int
$line
= 0
The line number on which this element occurs.
$name
protected
string
$name
= ''
The local name for this element
$namespace
protected
NamespaceDescriptor|string
$namespace
= ''
The namespace for this element
$package
protected
PackageDescriptor|string
$package
The package with which this element is associated
$parent
protected
NamespaceDescriptor|null
$parent
$summary
protected
string
$summary
= ''
A summary describing the function of this element in short.
$tags
protected
Collection<string|int, Collection<string|int, TagDescriptor>>
$tags
The tags associated with this element.
$traits
protected
Collection<string|int, TraitDescriptor>
$traits
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 —__construct()
Initializes the namespace with collections for its children.
public
__construct() : mixed
Return values
mixed —__toString()
Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
public
__toString() : string
Return values
string —addChild()
public
addChild(NamespaceDescriptor $namespaceDescriptor) : void
Parameters
- $namespaceDescriptor : NamespaceDescriptor
Return values
void —getAuthor()
public
getAuthor() : Collection<string|int, AuthorDescriptor>
Return values
Collection<string|int, AuthorDescriptor> —getChildren()
Returns a list of all namespaces contained in this namespace and its children.
public
getChildren() : Collection<string|int, NamespaceDescriptor>
Return values
Collection<string|int, NamespaceDescriptor> —getClasses()
Returns a list of all classes in this namespace.
public
getClasses() : Collection<string|int, ClassDescriptor>
Return values
Collection<string|int, ClassDescriptor> —getConstants()
Returns a list of all constants in this namespace.
public
getConstants() : Collection<string|int, ConstantDescriptor>
Return values
Collection<string|int, ConstantDescriptor> —getCopyright()
Returns the copyrights for this element.
public
getCopyright() : Collection<string|int, TagDescriptor>
Return values
Collection<string|int, TagDescriptor> —getDescription()
Returns the description for this element.
public
getDescription() : DescriptionDescriptor|null
This method will automatically attempt to inherit the parent's description if this one has none.
Return values
DescriptionDescriptor|null —getErrors()
Returns all errors that occur in this element.
public
getErrors() : Collection<string|int, Error>
Return values
Collection<string|int, Error> —getFile()
Returns the file in which this element resides or null in case the element is not bound to a file.
public
getFile() : FileDescriptor|null
.
Return values
FileDescriptor|null —getFullyQualifiedStructuralElementName()
Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
public
getFullyQualifiedStructuralElementName() : Fqsen|null
Return values
Fqsen|null —getFunctions()
Returns a list of all functions in this namespace.
public
getFunctions() : Collection<string|int, FunctionDescriptor>
Return values
Collection<string|int, FunctionDescriptor> —getInheritedElement()
public
getInheritedElement() : DescriptorAbstract|string|Fqsen|null
Return values
DescriptorAbstract|string|Fqsen|null —getInterfaces()
Returns a list of all interfaces in this namespace.
public
getInterfaces() : Collection<string|int, InterfaceDescriptor>
Return values
Collection<string|int, InterfaceDescriptor> —getLine()
Returns the line number where the definition for this element can be found.
public
getLine() : int
Return values
int —getName()
Returns the local name for this element.
public
getName() : string
Return values
string —getNamespace()
Returns the namespace for this element (defaults to global "\")
public
getNamespace() : NamespaceDescriptor|string
Return values
NamespaceDescriptor|string —getPackage()
Returns the package name for this element.
public
getPackage() : PackageDescriptor|null
Return values
PackageDescriptor|null —getParent()
Returns the parent namespace for this namespace.
public
getParent() : NamespaceDescriptor|null
Return values
NamespaceDescriptor|null —getPath()
Returns the path to the file containing this element relative to the project's root.
public
getPath() : string
Return values
string —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 —getTags()
Returns the tags associated with this element.
public
getTags() : Collection<string|int, Collection<string|int, TagDescriptor>>
Return values
Collection<string|int, Collection<string|int, TagDescriptor>> —getTraits()
Returns a list of all traits in this namespace.
public
getTraits() : Collection<string|int, TraitDescriptor>
Return values
Collection<string|int, TraitDescriptor> —getVersion()
Returns the versions for this element.
public
getVersion() : Collection<string|int, VersionDescriptor>
Return values
Collection<string|int, VersionDescriptor> —isDeprecated()
Checks whether this element is deprecated.
public
isDeprecated() : bool
Return values
bool —setChildren()
Sets a list of all child namespaces in this namespace.
public
setChildren(Collection<string|int, NamespaceDescriptor> $children) : void
Parameters
- $children : Collection<string|int, NamespaceDescriptor>
Return values
void —setClasses()
Sets a list of all classes in this project.
public
setClasses(Collection<string|int, ClassDescriptor> $classes) : void
Parameters
- $classes : Collection<string|int, ClassDescriptor>
Return values
void —setConstants()
Sets a list of all constants in this namespace.
public
setConstants(Collection<string|int, ConstantDescriptor> $constants) : void
Parameters
- $constants : Collection<string|int, ConstantDescriptor>
Return values
void —setFunctions()
Sets a list of all functions in this namespace.
public
setFunctions(Collection<string|int, FunctionDescriptor> $functions) : void
Parameters
- $functions : Collection<string|int, FunctionDescriptor>
Return values
void —setInterfaces()
Sets a list of all interfaces in this namespace.
public
setInterfaces(Collection<string|int, InterfaceDescriptor> $interfaces) : void
Parameters
- $interfaces : Collection<string|int, InterfaceDescriptor>
Return values
void —setParent()
Sets the parent namespace for this namespace.
public
setParent(mixed $parent) : void
Parameters
- $parent : mixed
Return values
void —setTraits()
Sets a list of all traits contained in this namespace.
public
setTraits(Collection<string|int, TraitDescriptor> $traits) : void
Parameters
- $traits : Collection<string|int, TraitDescriptor>