Documentation

ClassConst
in package
implements Builder

Table of Contents

Interfaces

Builder

Properties

$attributeGroups  : array<int, AttributeGroup>
$attributes  : array<string, mixed>
$constants  : array<int, Const_>
$flags  : int
$type  : Identifier|Name|ComplexType|null

Methods

__construct()  : mixed
Creates a class constant builder
addAttribute()  : $this
Adds an attribute group.
addConst()  : $this
Add another constant to const group
getNode()  : ClassConst
Returns the built class node.
makeFinal()  : $this
Makes the constant final.
makePrivate()  : $this
Makes the constant private.
makeProtected()  : $this
Makes the constant protected.
makePublic()  : $this
Makes the constant public.
setDocComment()  : $this
Sets doc comment for the constant.
setType()  : $this
Sets the constant type.

Properties

$attributes

protected array<string, mixed> $attributes = []

Methods

__construct()

Creates a class constant builder

public __construct(string|Identifier $name, Expr|bool|null|int|float|string|array<string|int, mixed> $value) : mixed
Parameters
$name : string|Identifier

Name

$value : Expr|bool|null|int|float|string|array<string|int, mixed>

Value

addConst()

Add another constant to const group

public addConst(string|Identifier $name, Expr|bool|null|int|float|string|array<string|int, mixed> $value) : $this
Parameters
$name : string|Identifier

Name

$value : Expr|bool|null|int|float|string|array<string|int, mixed>

Value

Return values
$this

The builder instance (for fluid interface)

makeFinal()

Makes the constant final.

public makeFinal() : $this
Return values
$this

The builder instance (for fluid interface)

makePrivate()

Makes the constant private.

public makePrivate() : $this
Return values
$this

The builder instance (for fluid interface)

makeProtected()

Makes the constant protected.

public makeProtected() : $this
Return values
$this

The builder instance (for fluid interface)

makePublic()

Makes the constant public.

public makePublic() : $this
Return values
$this

The builder instance (for fluid interface)

setDocComment()

Sets doc comment for the constant.

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

Doc comment to set

Return values
$this

The builder instance (for fluid interface)


        
On this page

Search results