ArgumentInterface
extends
ElementInterface, IsTyped
in
Describes the public interface for a descriptor of an Argument.
Table of Contents
Methods
- getDefault() : string|null
- Returns the default value for an argument as string or null if no default is set.
- 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>
- getFullyQualifiedStructuralElementName() : Fqsen|null
- Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
- getLine() : int
- Returns the line number where this element may be found.
- getMethod() : MethodInterface
- getName() : string
- Returns the local 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 file location for this element relative to the project root.
- getSummary() : string
- Returns the summary describing this element.
- getTags() : Collection<string|int, Collection<string|int, TagDescriptor>>
- Returns all tags associated with this element.
- getType() : Type|null
- Returns a normalized Types.
- isByReference() : bool
- Returns whether the parameter is passed by reference or by value.
- isVariadic() : bool
- Returns whether this argument represents a variadic argument.
- setByReference() : void
- Sets whether this argument passes its parameter by reference or by value.
- setDefault() : void
- Sets the default value for an argument expressed as a string.
- setDescription() : void
- Sets a longer description for this element.
- setFullyQualifiedStructuralElementName() : void
- Sets the Fully Qualified Structural Element Name (FQSEN) for this element.
- setLocation() : void
- Sets the file and location for this element.
- setMethod() : void
- To which method does this argument belong to
- setName() : void
- Sets the local name for this element.
- setSummary() : void
- Sets a summary describing this element.
- setType() : void
- Sets a normalized list of types that the argument represents.
- setVariadic() : void
- Sets whether this argument represents a variadic argument.
Methods
getDefault()
Returns the default value for an argument as string or null if no default is set.
public
getDefault() : string|null
Return values
string|null —A textual representation of the default value, or null if no default value is present.
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()
public
getErrors() : Collection<string|int, Error>
Return values
Collection<string|int, Error>getFullyQualifiedStructuralElementName()
Returns the Fully Qualified Structural Element Name (FQSEN) for this element.
public
getFullyQualifiedStructuralElementName() : Fqsen|null
Return values
Fqsen|nullgetLine()
Returns the line number where this element may be found.
public
getLine() : int
Tags
Return values
intgetMethod()
public
getMethod() : MethodInterface
Return values
MethodInterfacegetName()
Returns the local 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 file location for this element relative to the project root.
public
getPath() : string
Return values
stringgetSummary()
Returns the summary describing this element.
public
getSummary() : string
Return values
stringgetTags()
Returns all tags associated with this element.
public
getTags() : Collection<string|int, Collection<string|int, TagDescriptor>>
Return values
Collection<string|int, Collection<string|int, TagDescriptor>>getType()
Returns a normalized Types.
public
getType() : Type|null
Tags
Return values
Type|nullisByReference()
Returns whether the parameter is passed by reference or by value.
public
isByReference() : bool
Return values
bool —if the parameter is passed by reference, otherwise it is by value.
isVariadic()
Returns whether this argument represents a variadic argument.
public
isVariadic() : bool
Return values
boolsetByReference()
Sets whether this argument passes its parameter by reference or by value.
public
setByReference(IsApplicable $byReference) : void
Parameters
- $byReference : IsApplicable
-
True if the parameter is passed by reference, otherwise it is by value.
setDefault()
Sets the default value for an argument expressed as a string.
public
setDefault(string $value) : void
Parameters
- $value : string
-
A textual representation of the default value.
setDescription()
Sets a longer description for this element.
public
setDescription(DescriptionDescriptor $description) : void
Parameters
- $description : DescriptionDescriptor
setFullyQualifiedStructuralElementName()
Sets the Fully Qualified Structural Element Name (FQSEN) for this element.
public
setFullyQualifiedStructuralElementName(Fqsen $name) : void
Parameters
- $name : Fqsen
setLocation()
Sets the file and location for this element.
public
setLocation(FileInterface $file, Location $startLocation) : void
Parameters
- $file : FileInterface
- $startLocation : Location
setMethod()
To which method does this argument belong to
public
setMethod(MethodInterface $method) : void
Parameters
- $method : MethodInterface
setName()
Sets the local name for this element.
public
setName(string $name) : void
Parameters
- $name : string
setSummary()
Sets a summary describing this element.
public
setSummary(string $summary) : void
Parameters
- $summary : string
setType()
Sets a normalized list of types that the argument represents.
public
setType(Type|null $type) : void
Arguments should have one of the types mentioned in this array. If this array is empty than that is considered
to be the type mixed
(meaning: can be anything).
Any Type representing a class/interface/trait should be normalized to its complete FQCN, including preceding backslash. Types that do not represent a class/interface/trait should be written in lowercaps and should not be preceded by a backslash.
Parameters
- $type : Type|null
-
Type of this agument represented as a reflection type.
Tags
setVariadic()
Sets whether this argument represents a variadic argument.
public
setVariadic(IsApplicable $isVariadic) : void
Parameters
- $isVariadic : IsApplicable