PHP Class PhpParser\Node\Stmt\ClassMethod

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 to return by reference
$flags Flags
$name Name
$params Parameters
$returnType Return type
$stmts Statements
$type

Public Methods

Method Description
__construct ( string $name, array $subNodes = [], array $attributes = [] ) Constructs a class method node.
getParams ( )
getReturnType ( )
getStmts ( )
getSubNodeNames ( )
isAbstract ( )
isFinal ( )
isPrivate ( )
isProtected ( )
isPublic ( )
isStatic ( )
returnsByRef ( )

Method Details

__construct() public method

Constructs a class method node.
public __construct ( string $name, array $subNodes = [], array $attributes = [] )
$name string Name
$subNodes array Array of the following optional subnodes: 'flags => MODIFIER_PUBLIC: Flags '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 ( )

isAbstract() public method

public isAbstract ( )

isFinal() public method

public isFinal ( )

isPrivate() public method

public isPrivate ( )

isProtected() public method

public isProtected ( )

isPublic() public method

public isPublic ( )

isStatic() public method

public isStatic ( )

returnsByRef() public method

public returnsByRef ( )

Property Details

$byRef public property

Whether to return by reference
public $byRef

$flags public property

Flags
public $flags

$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

$type public property

Deprecation: Use $flags instead
public $type