Documentation

ClassConst
in package
implements Builder

Interfaces, Classes and Traits

Builder

Table of Contents

$attributeGroups  : array<string|int, AttributeGroup>
$attributes  : mixed
$constants  : mixed
$flags  : mixed
$type  : Identifier|Name|ComplexType
__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

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

Return values
mixed

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)

Search results