Documentation

Trait_ extends Declaration
in package

Table of Contents

$attributeGroups  : array<string|int, AttributeGroup>
$attributes  : mixed
$methods  : mixed
$name  : mixed
$properties  : mixed
$uses  : mixed
__construct()  : mixed
Creates an interface builder.
addAttribute()  : $this
Adds an attribute group.
addStmt()  : $this
Adds a statement.
addStmts()  : $this
Adds multiple statements.
getNode()  : Trait_
Returns the built trait node.
setDocComment()  : $this
Sets doc comment for the declaration.

Properties

$methods

protected mixed $methods = []

$properties

protected mixed $properties = []

$uses

protected mixed $uses = []

Methods

__construct()

Creates an interface builder.

public __construct(string $name) : mixed
Parameters
$name : string

Name of the interface

Return values
mixed

addStmt()

Adds a statement.

public addStmt(Stmt|Builder $stmt) : $this
Parameters
$stmt : Stmt|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)

getNode()

Returns the built trait node.

public getNode() : Trait_
Return values
Trait_

The built interface node

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