Copied!
CloneableInstantiable
Methods
public __construct( $name)
 

Creates an enum case builder.

  • param string|\Identifier $name Name
public addAttribute( $attribute)
 

Adds an attribute group.

  • param \Node\Attribute|\Node\AttributeGroup $attribute
  • return $this The builder instance (for fluid interface)
public getNode() : PhpParser\Node
 

Returns the built enum case node.

  • return \Stmt\EnumCase The built constant node
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)
public setValue( $value)
 

Sets the value.

  • param \Node\Expr|string|int $value
  • return $this
Properties
protected array $attributeGroups = []
 
  • var list<\Node\AttributeGroup>
protected array $attributes = []
 
  • var array<string,mixed>
protected $name = NULL
 
  • var \Identifier|string
protected ?PhpParser\Node\Expr $value = NULL
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration