Methods |
public
|
attribute(string|Name $name, array $args = []): Attribute
Creates an attribute node.
Creates an attribute node.
Parameters
$name |
Name of the attribute
|
$args |
Attribute named arguments
|
|
#
|
public
|
namespace(null|string|Name $name): Namespace_
Creates a namespace builder.
Creates a namespace builder.
Parameters
$name |
Name of the namespace
|
Returns
The created namespace builder
|
#
|
public
|
class(string $name): Class_
Creates a class builder.
Parameters
Returns
The created class builder
|
#
|
public
|
interface(string $name): Interface_
Creates an interface builder.
Creates an interface builder.
Parameters
$name |
Name of the interface
|
Returns
The created interface builder
|
#
|
public
|
trait(string $name): Trait_
Creates a trait builder.
Parameters
Returns
The created trait builder
|
#
|
public
|
enum(string $name): Enum_
Creates an enum builder.
|
#
|
public
|
useTrait(Name|string ...$traits): TraitUse
Creates a trait use builder.
Creates a trait use builder.
Parameters
Returns
The create trait use builder
|
#
|
public
|
traitUseAdaptation(Name|string|null $trait, Identifier|string $method = null): TraitUseAdaptation
Creates a trait use adaptation builder.
Creates a trait use adaptation builder.
Parameters
$trait |
Trait name
|
$method |
Method name
|
Returns
The create trait use adaptation builder
|
#
|
public
|
method(string $name): Method
Creates a method builder.
Creates a method builder.
Parameters
Returns
The created method builder
|
#
|
public
|
param(string $name): Param
Creates a parameter builder.
Creates a parameter builder.
Parameters
$name |
Name of the parameter
|
Returns
The created parameter builder
|
#
|
public
|
property(string $name): Property
Creates a property builder.
Creates a property builder.
Parameters
$name |
Name of the property
|
Returns
The created property builder
|
#
|
public
|
function(string $name): Function_
Creates a function builder.
Creates a function builder.
Parameters
$name |
Name of the function
|
Returns
The created function builder
|
#
|
public
|
use(Name|string $name): Use_
Creates a namespace/class use builder.
Creates a namespace/class use builder.
Parameters
$name |
Name of the entity (namespace or class) to alias
|
Returns
|
#
|
public
|
useFunction(Name|string $name): Use_
Creates a function use builder.
Creates a function use builder.
Parameters
$name |
Name of the function to alias
|
Returns
The created use function builder
|
#
|
public
|
useConst(Name|string $name): Use_
Creates a constant use builder.
Creates a constant use builder.
Parameters
$name |
Name of the const to alias
|
Returns
The created use const builder
|
#
|
public
|
classConst(string|Identifier $name, Expr|bool|null|int|float|string|array $value): ClassConst
Creates a class constant builder.
Creates a class constant builder.
Parameters
Returns
The created use const builder
|
#
|
public
|
enumCase(string|Identifier $name): EnumCase
Creates an enum case builder.
Creates an enum case builder.
Parameters
Returns
The created use const builder
|
#
|
public
|
val(Expr|bool|null|int|float|string|array $value): Expr
Creates node a for a literal value.
Creates node a for a literal value.
Parameters
|
#
|
public
|
var(string|Expr $name): Variable
Creates variable node.
|
#
|
public
|
args(array $args): Arg[]
Normalizes an argument list.
Normalizes an argument list.
Creates Arg nodes for all arguments and converts literal values to expressions.
Parameters
$args |
List of arguments to normalize
|
|
#
|
public
|
funcCall(string|Name|Expr $name, array $args = []): FuncCall
Creates a function call node.
Creates a function call node.
Parameters
$name |
Function name
|
$args |
Function arguments
|
|
#
|
public
|
methodCall(Expr $var, string|Identifier|Expr $name, array $args = []): MethodCall
Creates a method call node.
Creates a method call node.
Parameters
$var |
Variable the method is called on
|
$name |
Method name
|
$args |
Method arguments
|
|
#
|
public
|
staticCall(string|Name|Expr $class, string|Identifier|Expr $name, array $args = []): StaticCall
Creates a static method call node.
Creates a static method call node.
Parameters
$class |
Class name
|
$name |
Method name
|
$args |
Method arguments
|
|
#
|
public
|
new(string|Name|Expr $class, array $args = []): New_
Creates an object creation node.
Creates an object creation node.
Parameters
$class |
Class name
|
$args |
Constructor arguments
|
|
#
|
public
|
constFetch(string|Name $name): ConstFetch
Creates a constant fetch node.
Creates a constant fetch node.
Parameters
|
#
|
public
|
propertyFetch(Expr $var, string|Identifier|Expr $name): PropertyFetch
Creates a property fetch node.
Creates a property fetch node.
Parameters
$var |
Variable holding object
|
$name |
Property name
|
|
#
|
public
|
classConstFetch(string|Name|Expr $class, string|Identifier|Expr $name): ClassConstFetch
Creates a class constant fetch node.
Creates a class constant fetch node.
Parameters
$class |
Class name
|
$name |
Constant name
|
|
#
|
public
|
concat(Expr|string ...$exprs): Concat
Creates nested Concat nodes from a list of expressions.
Creates nested Concat nodes from a list of expressions.
Parameters
...$exprs |
Expressions or literal strings
|
|
#
|