ArgumentDescriptor
extends DescriptorAbstract
in package
implements
ArgumentInterface
uses
BelongsToMethod, CanHaveAType, CanHaveADefaultValue, CanBeByReference, CanBeVariadic
Descriptor representing a single Argument of a method or function.
Table of Contents
Interfaces
- ArgumentInterface
- Describes the public interface for a descriptor of an Argument.
Properties
- $byReference : IsApplicable
- $default : string|null
- $description : DescriptionDescriptor|null
- $endLocation : Location|null
- $errors : Collection<string|int, Error>
- $fileDescriptor : FileInterface|null
- $fqsen : Fqsen|null
- $inheritedElement : ElementInterface|string|Fqsen|null
- $isVariadic : IsApplicable
- $line : int
- $name : string
- $namespace : NamespaceInterface|string
- $package : PackageInterface|string
- $startLocation : Location|null
- $summary : string
- $tags : Collection<string|int, Collection<string|int, TagDescriptor>>
- $type : Type|null
- $metadata : array<string|int, Metadata>
- $method : MethodInterface
Methods
- __call() : Collection<string|int, TagDescriptor>|null
- Dynamically constructs a set of getters to retrieve tag (collections) with.
- __construct() : mixed
- Initializes this descriptor.
- __toString() : string
- Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
- getAuthor() : Collection<string|int, AuthorDescriptor>
- getCopyright() : Collection<string|int, TagDescriptor>
- Returns the copyrights for this element.
- getDefault() : string|null
- 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.
- 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.
- getInheritedElement() : ElementInterface|string|Fqsen|null
- Returns the element from which this element inherits, or null if it doesn't inherit any information.
- getLine() : int
- Returns the line number where the definition for this element can be found.
- getMetadata() : array<string|int, Metadata>
- getMethod() : MethodInterface
- getName() : string
- Returns the name for this element.
- getNamespace() : NamespaceInterface|string
- Returns the namespace for this element (defaults to global "\")
- getPackage() : PackageInterface|null
- Returns the package name for this element.
- getPath() : string
- Returns the path to the file containing this element relative to the project's root.
- getStartLocation() : Location|null
- Returns the start location where the definition for this element can be found.
- getSummary() : string
- Returns the summary which describes this element.
- getTags() : Collection<string|int, Collection<string|int, TagDescriptor>>
- Returns the tags associated with this element.
- getType() : Type|null
- getTypes() : array<int, Type>
- getVersion() : Collection<string|int, VersionDescriptor>
- Returns the versions for this element.
- isByReference() : bool
- isDeprecated() : bool
- Checks whether this element is deprecated.
- isVariadic() : bool
- Returns whether this argument represents a variadic argument.
- setByReference() : void
- setDefault() : void
- setDescription() : void
- Sets a description or none to inherit from a parent.
- setMetadata() : void
- setMethod() : void
- To which method does this argument belong to
- setType() : void
- setVariadic() : void
- Sets whether this argument represents a variadic argument.
- createDescription() : Description
- isDeprecatedByAttribute() : bool
- isDeprecatedByTag() : bool
Properties
$byReference
protected
IsApplicable
$byReference
whether the argument passes the parameter by reference instead of by value
$default
protected
string|null
$default
= null
the default value for an argument or null if none is provided
$description
protected
DescriptionDescriptor|null
$description
= null
$endLocation
protected
Location|null
$endLocation
= null
$errors
protected
Collection<string|int, Error>
$errors
A collection of errors found during filtering.
$fileDescriptor
protected
FileInterface|null
$fileDescriptor
= null
The file to which this element belongs; if applicable
$fqsen
protected
Fqsen|null
$fqsen
= null
Fully Qualified Structural Element Name; the FQCN including method, property or constant name
$inheritedElement
protected
ElementInterface|string|Fqsen|null
$inheritedElement
= null
the element from which to inherit information in this element
$isVariadic
protected
IsApplicable
$isVariadic
Determines if this Argument represents a variadic argument
$line
protected
int
$line
= 0
The line number on which this element occurs.
$name
protected
string
$name
= ''
$namespace
protected
NamespaceInterface|string
$namespace
= ''
The namespace for this element
$package
protected
PackageInterface|string
$package
The package with which this element is associated
$startLocation
protected
Location|null
$startLocation
= null
$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.
$type
protected
Type|null
$type
= null
normalized type of this argument
$metadata
private
array<string|int, Metadata>
$metadata
= []
$method
private
MethodInterface
$method
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 this descriptor.
public
__construct() : mixed
__toString()
Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
public
__toString() : string
Return values
stringgetAuthor()
public
getAuthor() : Collection<string|int, AuthorDescriptor>
Return values
Collection<string|int, AuthorDescriptor>getCopyright()
Returns the copyrights for this element.
public
getCopyright() : Collection<string|int, TagDescriptor>
Return values
Collection<string|int, TagDescriptor>getDefault()
public
getDefault() : string|null
Return values
string|nullgetDeprecations()
public
getDeprecations() : array<string|int, Deprecation>
Return values
array<string|int, Deprecation>getDescription()
Returns the description for this element.
public
getDescription() : DescriptionDescriptor
This method will automatically attempt to inherit the parent's description if this one has none.
Return values
DescriptionDescriptorgetEndLocation()
Returns the end location where the definition for this element can be found.
public
getEndLocation() : Location|null
Return values
Location|nullgetErrors()
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() : FileInterface|null
.
Return values
FileInterface|nullgetFullyQualifiedStructuralElementName()
Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
public
getFullyQualifiedStructuralElementName() : Fqsen|null
Return values
Fqsen|nullgetInheritedElement()
Returns the element from which this element inherits, or null if it doesn't inherit any information.
public
getInheritedElement() : ElementInterface|string|Fqsen|null
Return values
ElementInterface|string|Fqsen|nullgetLine()
Returns the line number where the definition for this element can be found.
public
getLine() : int
use getStartLocation()->getLineNumber() instead
Return values
intgetMetadata()
public
getMetadata() : array<string|int, Metadata>
Return values
array<string|int, Metadata>getMethod()
public
getMethod() : MethodInterface
Return values
MethodInterfacegetName()
Returns the name for this element.
public
getName() : string
Return values
stringgetNamespace()
Returns the namespace for this element (defaults to global "\")
public
getNamespace() : NamespaceInterface|string
Return values
NamespaceInterface|stringgetPackage()
Returns the package name for this element.
public
getPackage() : PackageInterface|null
Return values
PackageInterface|nullgetPath()
Returns the path to the file containing this element relative to the project's root.
public
getPath() : string
Return values
stringgetStartLocation()
Returns the start location where the definition for this element can be found.
public
getStartLocation() : Location|null
Return values
Location|nullgetSummary()
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
stringgetTags()
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>>getType()
public
getType() : Type|null
Return values
Type|nullgetTypes()
public
getTypes() : array<int, Type>
Return values
array<int, Type>getVersion()
Returns the versions for this element.
public
getVersion() : Collection<string|int, VersionDescriptor>
Return values
Collection<string|int, VersionDescriptor>isByReference()
public
isByReference() : bool
Return values
boolisDeprecated()
Checks whether this element is deprecated.
public
isDeprecated() : bool
Return values
boolisVariadic()
Returns whether this argument represents a variadic argument.
public
isVariadic() : bool
Return values
boolsetByReference()
public
setByReference(IsApplicable $byReference) : void
Parameters
- $byReference : IsApplicable
setDefault()
public
setDefault(string|null $value) : void
Parameters
- $value : string|null
setDescription()
Sets a description or none to inherit from a parent.
public
setDescription(DescriptionDescriptor|null $description) : void
Parameters
- $description : DescriptionDescriptor|null
setMetadata()
public
setMetadata(array<string|int, Metadata> $metadata) : void
Parameters
- $metadata : array<string|int, Metadata>
setMethod()
To which method does this argument belong to
public
setMethod(MethodInterface $method) : void
Parameters
- $method : MethodInterface
setType()
public
setType(Type|null $type) : void
Parameters
- $type : Type|null
setVariadic()
Sets whether this argument represents a variadic argument.
public
setVariadic(IsApplicable $isVariadic) : void
Parameters
- $isVariadic : IsApplicable
createDescription()
private
createDescription(string|null $param) : Description
Parameters
- $param : string|null
Return values
DescriptionisDeprecatedByAttribute()
private
isDeprecatedByAttribute() : bool
Tags
Return values
boolisDeprecatedByTag()
private
isDeprecatedByTag() : bool