Copied!
Cloneable Instantiable
Methods
public __construct ( $name , $value )
 

Creates a class constant builder

  • param string | Identifier $name Name
  • param Node\Expr | bool | null | int | float | string | array $value Value
public addAttribute ( $attribute )
 

Adds an attribute group.

  • param Node\Attribute | Node\AttributeGroup $attribute
  • return $this The builder instance (for fluid interface)
public addConst ( $name , $value )
 

Add another constant to const group

  • param string | Identifier $name Name
  • param Node\Expr | bool | null | int | float | string | array $value Value
  • return $this The builder instance (for fluid interface)
public getNode () : PhpParser\Node
 

Returns the built class node.

  • return Stmt\ClassConst The built constant node
public makeFinal ()
 

Makes the constant final.

  • return $this The builder instance (for fluid interface)
public makePrivate ()
 

Makes the constant private.

  • return $this The builder instance (for fluid interface)
public makeProtected ()
 

Makes the constant protected.

  • return $this The builder instance (for fluid interface)
public makePublic ()
 

Makes the constant public.

  • return $this The builder instance (for fluid interface)
public setDocComment ( $docComment )
 

Sets doc comment for the constant.

  • param PhpParser\Comment\Doc | string $docComment Doc comment to set
  • return $this The builder instance (for fluid interface)
Properties
protected $attributeGroups
 
  • var Node\AttributeGroup []
protected $attributes
protected $constants
protected $flags
© 2021 Bruce Wells
Search Namespaces \ Classes
Configuration