PHP Class PhpParser\Node\Stmt\Function_

Inheritance: extends PhpParser\Node\Stmt, implements PhpParser\Node\FunctionLike
Show file Open project: nikic/PHP-Parser Class Usage Examples

Public Properties

Property Type Description
$byRef Whether function returns by reference
$name Name
$params Parameters
$returnType Return type
$stmts Statements

Public Methods

Method Description
__construct ( string $name, array $subNodes = [], array $attributes = [] ) Constructs a function node.
getParams ( )
getReturnType ( )
getStmts ( )
getSubNodeNames ( )
returnsByRef ( )

Method Details

__construct() public method

Constructs a function node.
public __construct ( string $name, array $subNodes = [], array $attributes = [] )
$name string Name
$subNodes array Array of the following optional subnodes: 'byRef' => false : Whether to return by reference 'params' => array(): Parameters 'returnType' => null : Return type 'stmts' => array(): Statements
$attributes array Additional attributes

getParams() public method

public getParams ( )

getReturnType() public method

public getReturnType ( )

getStmts() public method

public getStmts ( )

getSubNodeNames() public method

public getSubNodeNames ( )

returnsByRef() public method

public returnsByRef ( )

Property Details

$byRef public property

Whether function returns by reference
public $byRef

$name public property

Name
public $name

$params public property

Parameters
public $params

$returnType public property

Return type
public $returnType

$stmts public property

Statements
public $stmts