Copied!
Cloneable Instantiable
Methods
public args ( array $args ) : array
 

Normalizes an argument list.

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

  • param array $args List of arguments to normalize
  • return Arg []
public attribute ( $name , array $args = [ ] ) : PhpParser\Node\Attribute
 

Creates an attribute node.

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

Creates a class builder.

public classConst ( $name , $value ) : PhpParser\Builder\ClassConst
 

Creates a class constant builder.

public classConstFetch ( $class , $name ) : PhpParser\Node\Expr\ClassConstFetch
 

Creates a class constant fetch node.

  • param string | Name | Expr $class Class name
  • param string | Identifier $name Constant name
  • return Expr\ClassConstFetch
public concat ( $exprs ) : PhpParser\Node\Expr\BinaryOp\Concat
 

Creates nested Concat nodes from a list of expressions.

  • param Expr | string $exprs Expressions or literal strings
  • return Concat
public constFetch ( $name ) : PhpParser\Node\Expr\ConstFetch
 

Creates a constant fetch node.

  • param string | Name $name Constant name
  • return Expr\ConstFetch
public enum ( string $name ) : PhpParser\Builder\Enum_
 

Creates an enum builder.

public enumCase ( $name ) : PhpParser\Builder\EnumCase
 

Creates an enum case builder.

public funcCall ( $name , array $args = [ ] ) : PhpParser\Node\Expr\FuncCall
 

Creates a function call node.

  • param string | Name | Expr $name Function name
  • param array $args Function arguments
  • return Expr\FuncCall
public function ( string $name ) : PhpParser\Builder\Function_
 

Creates a function builder.

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

Creates an interface builder.

public method ( string $name ) : PhpParser\Builder\Method
 

Creates a method builder.

public methodCall ( PhpParser\Node\Expr $var , $name , array $args = [ ] ) : PhpParser\Node\Expr\MethodCall
 

Creates a method call node.

  • param Expr $var Variable the method is called on
  • param string | Identifier | Expr $name Method name
  • param array $args Method arguments
  • return Expr\MethodCall
public namespace ( $name ) : PhpParser\Builder\Namespace_
 

Creates a namespace builder.

public new ( $class , array $args = [ ] ) : PhpParser\Node\Expr\New_
 

Creates an object creation node.

  • param string | Name | Expr $class Class name
  • param array $args Constructor arguments
  • return Expr\New_
public param ( string $name ) : PhpParser\Builder\Param
 

Creates a parameter builder.

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

Creates a property builder.

public propertyFetch ( PhpParser\Node\Expr $var , $name ) : PhpParser\Node\Expr\PropertyFetch
 

Creates a property fetch node.

  • param Expr $var Variable holding object
  • param string | Identifier | Expr $name Property name
  • return Expr\PropertyFetch
public staticCall ( $class , $name , array $args = [ ] ) : PhpParser\Node\Expr\StaticCall
 

Creates a static method call node.

  • param string | Name | Expr $class Class name
  • param string | Identifier | Expr $name Method name
  • param array $args Method arguments
  • return Expr\StaticCall
public trait ( string $name ) : PhpParser\Builder\Trait_
 

Creates a trait builder.

public traitUseAdaptation ( $trait , $method = NULL ) : PhpParser\Builder\TraitUseAdaptation
 

Creates a trait use adaptation builder.

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

Creates a namespace/class use builder.

public useConst ( $name ) : PhpParser\Builder\Use_
 

Creates a constant use builder.

public useFunction ( $name ) : PhpParser\Builder\Use_
 

Creates a function use builder.

public useTrait ( $traits ) : PhpParser\Builder\TraitUse
 

Creates a trait use builder.

public val ( $value ) : PhpParser\Node\Expr
 

Creates node a for a literal value.

  • param Expr | bool | null | int | float | string | array $value $value
  • return Expr
public var ( $name ) : PhpParser\Node\Expr\Variable
 

Creates variable node.

  • param string | Expr $name Name
  • return Expr\Variable
Methods
private normalizeStringExpr ( $expr ) : PhpParser\Node\Expr
 
  • param string | Expr $expr
  • return Expr
© 2021 Bruce Wells
Search Namespaces \ Classes
Configuration