Documentation

Namespace_ extends Declaration
in package

Table of Contents

$attributes  : mixed
$name  : mixed
$stmts  : mixed
__construct()  : mixed
Creates a namespace builder.
addStmt()  : $this
Adds a statement.
addStmts()  : $this
Adds multiple statements.
getNode()  : Namespace_
Returns the built node.
setDocComment()  : $this
Sets doc comment for the declaration.

Properties

Methods

__construct()

Creates a namespace builder.

public __construct(Name|string|null $name) : mixed
Parameters
$name : Name|string|null

Name of the namespace

Return values
mixed

addStmt()

Adds a statement.

public addStmt(Node|Builder $stmt) : $this
Parameters
$stmt : Node|Builder

The statement to add

Return values
$this

The builder instance (for fluid interface)

addStmts()

Adds multiple statements.

public addStmts(array<string|int, mixed> $stmts) : $this
Parameters
$stmts : array<string|int, mixed>

The statements to add

Return values
$this

The builder instance (for fluid interface)

setDocComment()

Sets doc comment for the declaration.

public setDocComment(Doc|string $docComment) : $this
Parameters
$docComment : Doc|string

Doc comment to set

Return values
$this

The builder instance (for fluid interface)

Search results