Methods |
public
|
__construct(string|Identifier $name, Expr|bool|null|int|float|string|array $value)
Creates a class constant builder
Creates a class constant builder
Parameters
|
#
|
public
|
addConst(string|Identifier $name, Expr|bool|null|int|float|string|array $value): $this
Add another constant to const group
Add another constant to const group
Parameters
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makePublic(): $this
Makes the constant public.
Makes the constant public.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makeProtected(): $this
Makes the constant protected.
Makes the constant protected.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makePrivate(): $this
Makes the constant private.
Makes the constant private.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
makeFinal(): $this
Makes the constant final.
Makes the constant final.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
setDocComment(Doc|string $docComment): $this
Sets doc comment for the constant.
Sets doc comment for the constant.
Parameters
$docComment |
Doc comment to set
|
Returns
The builder instance (for fluid interface)
|
#
|
public
|
addAttribute(Attribute|AttributeGroup $attribute): $this
Adds an attribute group.
Returns
The builder instance (for fluid interface)
|
#
|
public
|
getNode(): ClassConst
Returns the built class node.
Returns the built class node.
Returns
Implements
|
#
|