Copied!
CloneableInstantiable
Methods
public __construct(string $name)
 

Creates a method builder.

  • param string $name Name of the method
public addAttribute( $attribute)
 

Adds an attribute group.

  • param \Node\Attribute|\Node\AttributeGroup $attribute
  • return $this The builder instance (for fluid interface)
public PhpParser\Builder\FunctionLike::addParam( $param)
 

Adds a parameter.

  • param \Node\Param|\Param $param The parameter to add
  • return $this The builder instance (for fluid interface)
public PhpParser\Builder\FunctionLike::addParams(array $params)
 

Adds multiple parameters.

  • param (\Node\Param|\Param)[] $params The parameters to add
  • return $this The builder instance (for fluid interface)
public addStmt( $stmt)
 

Adds a statement.

  • param \Node|\PhpParser\Builder $stmt The statement to add
  • return $this The builder instance (for fluid interface)
public PhpParser\Builder\Declaration::addStmts(array $stmts)
 

Adds multiple statements.

  • param (\PhpParser\Node\Stmt|\PhpParser\Builder)[] $stmts The statements to add
  • return $this The builder instance (for fluid interface)
public getNode() : PhpParser\Node
 

Returns the built method node.

  • return \Stmt\ClassMethod The built method node
public makeAbstract()
 

Makes the method abstract.

  • return $this The builder instance (for fluid interface)
public makeFinal()
 

Makes the method final.

  • return $this The builder instance (for fluid interface)
public makePrivate()
 

Makes the method private.

  • return $this The builder instance (for fluid interface)
public makeProtected()
 

Makes the method protected.

  • return $this The builder instance (for fluid interface)
public makePublic()
 

Makes the method public.

  • return $this The builder instance (for fluid interface)
public PhpParser\Builder\FunctionLike::makeReturnByRef()
 

Make the function return by reference.

  • return $this The builder instance (for fluid interface)
public makeStatic()
 

Makes the method static.

  • return $this The builder instance (for fluid interface)
public PhpParser\Builder\Declaration::setDocComment( $docComment)
 

Sets doc comment for the declaration.

  • param \PhpParser\Comment\Doc|string $docComment Doc comment to set
  • return $this The builder instance (for fluid interface)
public PhpParser\Builder\FunctionLike::setReturnType( $type)
 

Sets the return type for PHP 7.

  • param string|\Node\Name|\Node\Identifier|\Node\ComplexType $type
  • return $this The builder instance (for fluid interface)
Properties
protected array $attributeGroups = []
 
  • var list<\Node\AttributeGroup>
protected array PhpParser\Builder\Declaration::$attributes = []
 
  • var array<string,mixed>
protected int $flags = 0
protected string $name
protected array PhpParser\Builder\FunctionLike::$params = []
 
  • var \Node\Param[]
protected bool PhpParser\Builder\FunctionLike::$returnByRef = false
protected ?PhpParser\Node PhpParser\Builder\FunctionLike::$returnType = NULL
 
  • var \Node\Identifier|\Node\Name|\Node\ComplexType|null
protected ?array $stmts = []
 
  • var list<\Stmt>|null
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration