Copied!
Abstract
Methods
public addParam( $param)
 

Adds a parameter.

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

Adds multiple parameters.

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

Adds a statement.

  • param \PhpParser\Node\Stmt|\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 abstract PhpParser\Builder::getNode() : PhpParser\Node
 

Returns the built node.

  • return \Node The built node
public makeReturnByRef()
 

Make the function return by reference.

  • 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 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 PhpParser\Builder\Declaration::$attributes = []
 
  • var array<string,mixed>
protected array $params = []
 
  • var \Node\Param[]
protected bool $returnByRef = false
protected ?PhpParser\Node $returnType = NULL
 
  • var \Node\Identifier|\Node\Name|\Node\ComplexType|null
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration