PHP Class PhpParser\Builder\Method

Inheritance: extends PhpParser\BuilderAbstract
Show file Open project: nikic/PHP-Parser

Protected Properties

Property Type Description
$flags
$name
$stmts array | null

Public Methods

Method Description
__construct ( string $name ) Creates a method builder.
addStmt ( PhpParser\Node | PhpParser\Builder $stmt ) Adds a statement.
getNode ( ) : ClassMethod Returns the built method node.
makeAbstract ( ) Makes the method abstract.
makeFinal ( ) Makes the method final.
makePrivate ( ) Makes the method private.
makeProtected ( ) Makes the method protected.
makePublic ( ) Makes the method public.
makeStatic ( ) Makes the method static.

Method Details

__construct() public method

Creates a method builder.
public __construct ( string $name )
$name string Name of the method

addStmt() public method

Adds a statement.
public addStmt ( PhpParser\Node | PhpParser\Builder $stmt )
$stmt PhpParser\Node | PhpParser\Builder The statement to add

getNode() public method

Returns the built method node.
public getNode ( ) : ClassMethod
return PhpParser\Node\Stmt\ClassMethod The built method node

makeAbstract() public method

Makes the method abstract.
public makeAbstract ( )

makeFinal() public method

Makes the method final.
public makeFinal ( )

makePrivate() public method

Makes the method private.
public makePrivate ( )

makeProtected() public method

Makes the method protected.
public makeProtected ( )

makePublic() public method

Makes the method public.
public makePublic ( )

makeStatic() public method

Makes the method static.
public makeStatic ( )

Property Details

$flags protected property

protected $flags

$name protected property

protected $name

$stmts protected property

protected array|null $stmts
return array | null