Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EnumCase.php

class EnumCase

Same name in this branch
  1. 11.1.x vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php \PhpParser\Builder\EnumCase

Hierarchy

  • class \PhpParser\Node\Stmt\EnumCase extends \Node\Stmt

Expanded class hierarchy of EnumCase

File

vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php, line 8

Namespace

PhpParser\Node\Stmt
View source
class EnumCase extends Node\Stmt {
    
    /** @var Node\Identifier Enum case name */
    public Node\Identifier $name;
    
    /** @var Node\Expr|null Enum case expression */
    public ?Node\Expr $expr;
    
    /** @var Node\AttributeGroup[] PHP attribute groups */
    public array $attrGroups;
    
    /**
     * @param string|Node\Identifier $name Enum case name
     * @param Node\Expr|null $expr Enum case expression
     * @param list<AttributeGroup> $attrGroups PHP attribute groups
     * @param array<string, mixed> $attributes Additional attributes
     */
    public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) {
        parent::__construct($attributes);
        $this->name = \is_string($name) ? new Node\Identifier($name) : $name;
        $this->expr = $expr;
        $this->attrGroups = $attrGroups;
    }
    public function getSubNodeNames() : array {
        return [
            'attrGroups',
            'name',
            'expr',
        ];
    }
    public function getType() : string {
        return 'Stmt_EnumCase';
    }

}

Members

Title Sort descending Modifiers Object type Summary
EnumCase::$attrGroups public property @var Node\AttributeGroup[] PHP attribute groups
EnumCase::$expr public property @var Node\Expr|null Enum case expression
EnumCase::$name public property @var Node\Identifier Enum case name
EnumCase::getSubNodeNames public function
EnumCase::getType public function
EnumCase::__construct public function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal