MethodDescriptor
Descriptor representing a Method in a Class, Interface or Trait.
Interfaces, Classes & Used Traits
- MethodInterface
- Describes the public interface of the description for a method.
- VisibilityInterface
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
$parent Line 29
protected$parent : \phpDocumentor\Descriptor\ClassDescriptor|\phpDocumentor\Descriptor\InterfaceDescriptor|\phpDocumentor\Descriptor\TraitDescriptor
$abstract Line 32
protected$abstract : bool
$final Line 35
protected$final : bool
$static Line 38
protected$static : bool
$visibility Line 41
protected$visibility : string
$arguments Line 44
protected$arguments : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ArgumentDescriptor>
$returnType Line 47
private$returnType : \phpDocumentor\Reflection\Type
Methods
__construct() Line 52
Initializes the all properties representing a collection with a new Collection object.
public__construct() : mixed
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
getPath() inherited
Returns the path to the file containing this element relative to the project's root.
publicgetPath() : string
getFile() Line 164
Returns the file associated with the parent class, interface or trait.
publicgetFile() : FileDescriptor
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() inherited
Represents this object by its unique identifier, the Fully Qualified Structural Element Name.
public__toString() : string
getInheritedElement() Line 220
Returns the Method from which this method should inherit its information, if any.
publicgetInheritedElement() : DescriptorAbstract|string|Fqsen|null
The inheritance scheme for a method is more complicated than for most elements; the following business rules apply:
- if the parent class/interface extends another class or other interfaces (interfaces have multiple
inheritance!) then:
- Check each parent class/interface's parent if they have a method with the exact same name
- if a method is found with the same name; return the first one encountered.
- if the parent is a class and implements interfaces, check each interface for a method with the exact same name. If such a method is found, return the first hit.
Returns
DescriptorAbstract|string|Fqsen|null —
setParent() Line 62
publicsetParent(ClassDescriptor|InterfaceDescriptor|TraitDescriptor $parent) : void
getParent() Line 77
publicgetParent() : ClassDescriptor|InterfaceDescriptor|TraitDescriptor
setAbstract() Line 82
publicsetAbstract(bool $abstract) : void
Parameters
isAbstract() Line 87
publicisAbstract() : bool
Returns
bool —
setFinal() Line 92
publicsetFinal(bool $final) : void
Parameters
isFinal() Line 97
publicisFinal() : bool
Returns
bool —
setStatic() Line 102
publicsetStatic(bool $static) : void
Parameters
isStatic() Line 107
publicisStatic() : bool
Returns
bool —
setVisibility() Line 112
publicsetVisibility(string $visibility) : void
Parameters
The following values are supported:
- public
- protected
- private
Returns
string —
setArguments() Line 125
publicsetArguments(\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ArgumentDescriptor> $arguments) : void
Parameters
addArgument() Line 135
publicaddArgument(string $name, ArgumentDescriptor $argument) : void
getArguments() Line 141
publicgetArguments() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ArgumentDescriptor>
Returns
\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\ArgumentDescriptor> —
getResponse() Line 146
publicgetResponse() : ReturnDescriptor
getReturn() Line 172
publicgetReturn() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Tag\ReturnDescriptor>
Returns
\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Tag\ReturnDescriptor> —
getParam() Line 191
publicgetParam() : \phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Tag\ParamDescriptor>
Returns
\phpDocumentor\Descriptor\Collection<\phpDocumentor\Descriptor\Tag\ParamDescriptor> —
setReturnType() Line 274
Sets return type of this method.
publicsetReturnType(Type $returnType) : void