Documentation

BuilderFactory
in package

Table of Contents

Methods

args()  : array<int, Arg>
Normalizes an argument list.
attribute()  : Attribute
Creates an attribute node.
class()  : Class_
Creates a class builder.
classConst()  : ClassConst
Creates a class constant builder.
classConstFetch()  : ClassConstFetch
Creates a class constant fetch node.
concat()  : Concat
Creates nested Concat nodes from a list of expressions.
constFetch()  : ConstFetch
Creates a constant fetch node.
enum()  : Enum_
Creates an enum builder.
enumCase()  : EnumCase
Creates an enum case builder.
funcCall()  : FuncCall
Creates a function call node.
function()  : Function_
Creates a function builder.
interface()  : Interface_
Creates an interface builder.
method()  : Method
Creates a method builder.
methodCall()  : MethodCall
Creates a method call node.
namespace()  : Namespace_
Creates a namespace builder.
new()  : New_
Creates an object creation node.
param()  : Param
Creates a parameter builder.
property()  : Property
Creates a property builder.
propertyFetch()  : PropertyFetch
Creates a property fetch node.
staticCall()  : StaticCall
Creates a static method call node.
trait()  : Trait_
Creates a trait builder.
traitUseAdaptation()  : TraitUseAdaptation
Creates a trait use adaptation builder.
use()  : Use_
Creates a namespace/class use builder.
useConst()  : Use_
Creates a constant use builder.
useFunction()  : Use_
Creates a function use builder.
useTrait()  : TraitUse
Creates a trait use builder.
val()  : Expr
Creates node a for a literal value.
var()  : Variable
Creates variable node.
normalizeStringExpr()  : Expr

Methods

args()

Normalizes an argument list.

public args(array<string|int, mixed> $args) : array<int, Arg>

Creates Arg nodes for all arguments and converts literal values to expressions.

Parameters
$args : array<string|int, mixed>

List of arguments to normalize

Return values
array<int, Arg>

attribute()

Creates an attribute node.

public attribute(string|Name $name[, array<string|int, mixed> $args = [] ]) : Attribute
Parameters
$name : string|Name

Name of the attribute

$args : array<string|int, mixed> = []

Attribute named arguments

Return values
Attribute

class()

Creates a class builder.

public class(string $name) : Class_
Parameters
$name : string

Name of the class

Return values
Class_

The created class builder

classConst()

Creates a class constant builder.

public classConst(string|Identifier $name, Expr|bool|null|int|float|string|array<string|int, mixed> $value) : ClassConst
Parameters
$name : string|Identifier

Name

$value : Expr|bool|null|int|float|string|array<string|int, mixed>

Value

Return values
ClassConst

The created use const builder

concat()

Creates nested Concat nodes from a list of expressions.

public concat(Expr|string ...$exprs) : Concat
Parameters
$exprs : Expr|string

Expressions or literal strings

Return values
Concat

enum()

Creates an enum builder.

public enum(string $name) : Enum_
Parameters
$name : string

Name of the enum

Return values
Enum_

The created enum builder

funcCall()

Creates a function call node.

public funcCall(string|Name|Expr $name[, array<string|int, mixed> $args = [] ]) : FuncCall
Parameters
$name : string|Name|Expr

Function name

$args : array<string|int, mixed> = []

Function arguments

Return values
FuncCall

function()

Creates a function builder.

public function(string $name) : Function_
Parameters
$name : string

Name of the function

Return values
Function_

The created function builder

interface()

Creates an interface builder.

public interface(string $name) : Interface_
Parameters
$name : string

Name of the interface

Return values
Interface_

The created interface builder

method()

Creates a method builder.

public method(string $name) : Method
Parameters
$name : string

Name of the method

Return values
Method

The created method builder

namespace()

Creates a namespace builder.

public namespace(null|string|Name $name) : Namespace_
Parameters
$name : null|string|Name

Name of the namespace

Return values
Namespace_

The created namespace builder

new()

Creates an object creation node.

public new(string|Name|Expr $class[, array<string|int, mixed> $args = [] ]) : New_
Parameters
$class : string|Name|Expr

Class name

$args : array<string|int, mixed> = []

Constructor arguments

Return values
New_

param()

Creates a parameter builder.

public param(string $name) : Param
Parameters
$name : string

Name of the parameter

Return values
Param

The created parameter builder

property()

Creates a property builder.

public property(string $name) : Property
Parameters
$name : string

Name of the property

Return values
Property

The created property builder

trait()

Creates a trait builder.

public trait(string $name) : Trait_
Parameters
$name : string

Name of the trait

Return values
Trait_

The created trait builder

use()

Creates a namespace/class use builder.

public use(Name|string $name) : Use_
Parameters
$name : Name|string

Name of the entity (namespace or class) to alias

Return values
Use_

The created use builder

useConst()

Creates a constant use builder.

public useConst(Name|string $name) : Use_
Parameters
$name : Name|string

Name of the const to alias

Return values
Use_

The created use const builder

useFunction()

Creates a function use builder.

public useFunction(Name|string $name) : Use_
Parameters
$name : Name|string

Name of the function to alias

Return values
Use_

The created use function builder

useTrait()

Creates a trait use builder.

public useTrait(Name|string ...$traits) : TraitUse
Parameters
$traits : Name|string

Trait names

Return values
TraitUse

The created trait use builder

val()

Creates node a for a literal value.

public val(Expr|bool|null|int|float|string|array<string|int, mixed> $value) : Expr
Parameters
$value : Expr|bool|null|int|float|string|array<string|int, mixed>

$value

Return values
Expr

        
On this page

Search results