CloneableInstantiable
ExtendsPhpParser\Builder\Declaration
PhpParser\Builder\FunctionLike
ImplementsPhpParser\Builder
Methods
public __construct(string $name)
 

Creates a method builder.

    public PhpParser\Builder\FunctionLike::addParam( $param)
     

    Adds a parameter.

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

    Adds multiple parameters.

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

    Adds a statement.

    • return $this The builder instance (for fluid interface)
    public PhpParser\Builder\Declaration::addStmts(array $stmts)
     

    Adds multiple statements.

    • 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.

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

    Sets the return type for PHP 7.

    • return $this The builder instance (for fluid interface)
    Properties
    protected PhpParser\Builder\Declaration::$attributes
    protected $flags
    protected $name
    protected PhpParser\Builder\FunctionLike::$params
    protected PhpParser\Builder\FunctionLike::$returnByRef
    protected PhpParser\Builder\FunctionLike::$returnType
     
    • var string|Node\Name|Node\NullableType|null
    protected $stmts
     
    • var array|null
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only