method()
method(string $name) : \PhpParser\Builder\Method
Creates a method builder.
Parameters
string | $name | Name of the method |
Returns
\PhpParser\Builder\Method —The created method builder
The following methods use reserved keywords, so their implementation is defined with an underscore and made available with the reserved name through __call() magic.
method(string $name) : \PhpParser\Builder\Method
Creates a method builder.
string | $name | Name of the method |
The created method builder
param(string $name) : \PhpParser\Builder\Param
Creates a parameter builder.
string | $name | Name of the parameter |
The created parameter builder
property(string $name) : \PhpParser\Builder\Property
Creates a property builder.
string | $name | Name of the property |
The created property builder
_namespace(null|string|\PhpParser\Node\Name $name) : \PhpParser\Builder\Namespace_
Creates a namespace builder.
null|string|\PhpParser\Node\Name | $name | Name of the namespace |
The created namespace builder
_class(string $name) : \PhpParser\Builder\Class_
Creates a class builder.
string | $name | Name of the class |
The created class builder
_interface(string $name) : \PhpParser\Builder\Interface_
Creates an interface builder.
string | $name | Name of the interface |
The created interface builder
_trait(string $name) : \PhpParser\Builder\Trait_
Creates a trait builder.
string | $name | Name of the trait |
The created trait builder
_function(string $name) : \PhpParser\Builder\Function_
Creates a function builder.
string | $name | Name of the function |
The created function builder
_use( $name) : \PhpParser\Builder\Use_
Creates a namespace/class use builder.
$name |
The create use builder