MethodDeclaration
A declared class method.
- Copyright
- 2016 Appertly
- License
- Apache-2.0
Constructors / Destructors
Returns | Signature and Description |
---|---|
void | __construct ( , , )Creates a new MethodDeclaration. |
Instance Methods
Returns | Signature and Description |
---|---|
ScannedClass | getClass ()Gets the containing class. |
Block | Gets the doc comment block. |
string | Gets the source filename. |
string | getName ()Gets the name of the declaration. |
ConstMap <string ,ParameterTag > | Gets the parameter tags. |
? TypedTag | Gets the returns tag. |
ConstVector <TypedTag > | Gets the list of exceptions thrown. |
ScannedMethod | getToken ()Gets the scanned token. |
Method Details
__construct
public function
__construct
(ScannedMethod
$method
, ScannedClass
$class
, Block
$block
)Creates a new MethodDeclaration.
Name | Type | Description |
---|---|---|
$method | ScannedMethod | The method |
$class | ScannedClass | The interface, trait, or class |
$block | Block | The doc comment |
getClass
public function
getClass
()Gets the containing class.
Type | Description |
---|---|
ScannedClass | The containing class |
getDocBlock
public function
getDocBlock
()Gets the doc comment block.
Type | Description |
---|---|
Block | The doc block, which could be empty |
getFilename
public function
getFilename
()Gets the source filename.
Type | Description |
---|---|
string | The filename |
getName
public function
getName
()Gets the name of the declaration.
Type | Description |
---|---|
string | The declaration name |
getParameterTags
public function
getParameterTags
()Gets the parameter tags.
Type | Description |
---|---|
ConstMap <string ,ParameterTag > | The parameter tags |
getReturnsTag
public function
getReturnsTag
()Gets the returns tag.
Type | Description |
---|---|
? TypedTag | The return tag |
getThrowsTags
public function
getThrowsTags
()Gets the list of exceptions thrown.
Type | Description |
---|---|
ConstVector <TypedTag > | The throws tags |
getToken
public function
getToken
()Gets the scanned token.
Type | Description |
---|---|
ScannedMethod | The scanned token |