Copied!
CloneableInstantiable
Methods
public __construct(string $name)
 

Creates an enum builder.

  • param string $name Name of the enum
public addAttribute( $attribute)
 

Adds an attribute group.

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

Adds a statement.

  • param Stmt|PhpParser\Builder $stmt The statement to add
  • return $this The builder instance (for fluid interface)
public PhpParser\Builder\Declaration::addStmts(array $stmts)
 

Adds multiple statements.

  • param array $stmts The statements to add
  • return $this The builder instance (for fluid interface)
public getNode() : PhpParser\Node
 

Returns the built class node.

  • return Stmt\Enum_ The built enum node
public implement( $interfaces)
 

Implements one or more interfaces.

  • param Name|string $interfaces Names of interfaces to implement
  • return $this The builder instance (for fluid interface)
public PhpParser\Builder\Declaration::setDocComment( $docComment)
 

Sets doc comment for the declaration.

  • param PhpParser\Comment\Doc|string $docComment Doc comment to set
  • return $this The builder instance (for fluid interface)
public setScalarType( $scalarType)
 

Sets the scalar type.

  • param string|Identifier $type
  • return $this
Properties
protected $attributeGroups
 
  • var Node\AttributeGroup[]
protected PhpParser\Builder\Declaration::$attributes
protected $constants
protected $enumCases
protected $implements
protected $methods
protected $name
protected $scalarType
protected $uses
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration