interface FunctionLike
Hierarchy
- interface \PhpParser\Node
- interface \PhpParser\Node\FunctionLike extends \PhpParser\Node
Expanded class hierarchy of FunctionLike
All classes that implement FunctionLike
4 files declare their use of FunctionLike
- ArrowFunction.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Expr/ ArrowFunction.php - ClassMethod.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Stmt/ ClassMethod.php - Closure.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Expr/ Closure.php - Function_.php in vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Stmt/ Function_.php
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ FunctionLike.php, line 7
Namespace
PhpParser\NodeView source
interface FunctionLike extends Node {
/**
* Whether to return by reference
*/
public function returnsByRef() : bool;
/**
* List of parameters
*
* @return Param[]
*/
public function getParams() : array;
/**
* Get the declared return type or null
*
* @return null|Identifier|Name|ComplexType
*/
public function getReturnType();
/**
* The function body
*
* @return Stmt[]|null
*/
public function getStmts() : ?array;
/**
* Get PHP attribute groups.
*
* @return AttributeGroup[]
*/
public function getAttrGroups() : array;
}
Members
Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|---|
FunctionLike::getAttrGroups | public | function | Get PHP attribute groups. | 5 | |
FunctionLike::getParams | public | function | List of parameters | 5 | |
FunctionLike::getReturnType | public | function | Get the declared return type or null | 5 | |
FunctionLike::getStmts | public | function | The function body | 5 | |
FunctionLike::returnsByRef | public | function | Whether to return by reference | 5 | |
Node::getAttribute | public | function | Returns the value of an attribute. | 1 | |
Node::getAttributes | public | function | Returns all the attributes of this node. | 1 | |
Node::getComments | public | function | Gets all comments directly preceding this node. | 1 | |
Node::getDocComment | public | function | Gets the doc comment of the node. | 1 | |
Node::getEndFilePos | public | function | Gets the file offset of the last character that is part of this node. | 1 | |
Node::getEndLine | public | function | Gets the line the node ended in. | 1 | |
Node::getEndTokenPos | public | function | Gets the token offset of the last token that is part of this node. | 1 | |
Node::getLine | Deprecated | public | function | Gets line the node started in (alias of getStartLine). | 1 |
Node::getStartFilePos | public | function | Gets the file offset of the first character that is part of this node. | 1 | |
Node::getStartLine | public | function | Gets line the node started in. | 1 | |
Node::getStartTokenPos | public | function | Gets the token offset of the first token that is part of this node. | 1 | |
Node::getSubNodeNames | public | function | Gets the names of the sub nodes. | 21 | |
Node::getType | public | function | Gets the type of the node. | 21 | |
Node::hasAttribute | public | function | Returns whether an attribute exists. | 1 | |
Node::setAttribute | public | function | Sets an attribute on a node. | 1 | |
Node::setAttributes | public | function | Replaces all the attributes of this node. | 1 | |
Node::setDocComment | public | function | Sets the doc comment of the node. | 1 |