\PhpParserBuilderFactory

The following methods use reserved keywords, so their implementation is defined with an underscore and made available with the reserved name through __call() magic.

Summary

Methods
Properties
Constants
method()
param()
property()
__call()
namespace()
class()
interface()
trait()
function()
use()
No public properties found
No constants found
_namespace()
_class()
_interface()
_trait()
_function()
_use()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

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

param()

param(string  $name) : \PhpParser\Builder\Param

Creates a parameter builder.

Parameters

string $name

Name of the parameter

Returns

\PhpParser\Builder\Param

The created parameter builder

property()

property(string  $name) : \PhpParser\Builder\Property

Creates a property builder.

Parameters

string $name

Name of the property

Returns

\PhpParser\Builder\Property

The created property builder

__call()

__call(  $name, array  $args) 

Parameters

$name
array $args

namespace()

namespace(string  $name) : \PhpParser\Builder\Namespace_

Creates a namespace builder.

Parameters

string $name

Returns

\PhpParser\Builder\Namespace_

class()

class(string  $name) : \PhpParser\Builder\Class_

Creates a class builder.

Parameters

string $name

Returns

\PhpParser\Builder\Class_

interface()

interface(string  $name) : \PhpParser\Builder\Interface_

Creates an interface builder.

Parameters

string $name

Returns

\PhpParser\Builder\Interface_

trait()

trait(string  $name) : \PhpParser\Builder\Trait_

Creates a trait builder.

Parameters

string $name

Returns

\PhpParser\Builder\Trait_

function()

function(string  $name) : \PhpParser\Builder\Function_

Creates a function builder.

Parameters

string $name

Returns

\PhpParser\Builder\Function_

use()

use(string  $name) : \PhpParser\Builder\Use_

Creates a namespace/class use builder.

Parameters

string $name

Returns

\PhpParser\Builder\Use_

_namespace()

_namespace(null|string|\PhpParser\Node\Name  $name) : \PhpParser\Builder\Namespace_

Creates a namespace builder.

Parameters

null|string|\PhpParser\Node\Name $name

Name of the namespace

Returns

\PhpParser\Builder\Namespace_

The created namespace builder

_class()

_class(string  $name) : \PhpParser\Builder\Class_

Creates a class builder.

Parameters

string $name

Name of the class

Returns

\PhpParser\Builder\Class_

The created class builder

_interface()

_interface(string  $name) : \PhpParser\Builder\Interface_

Creates an interface builder.

Parameters

string $name

Name of the interface

Returns

\PhpParser\Builder\Interface_

The created interface builder

_trait()

_trait(string  $name) : \PhpParser\Builder\Trait_

Creates a trait builder.

Parameters

string $name

Name of the trait

Returns

\PhpParser\Builder\Trait_

The created trait builder

_function()

_function(string  $name) : \PhpParser\Builder\Function_

Creates a function builder.

Parameters

string $name

Name of the function

Returns

\PhpParser\Builder\Function_

The created function builder

_use()

_use(  $name) : \PhpParser\Builder\Use_

Creates a namespace/class use builder.

Parameters

$name

Returns

\PhpParser\Builder\Use_

The create use builder