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

Breadcrumb

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

function EnumCase::__construct

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

Parameters

string|Node\Identifier $name Enum case name:

Node\Expr|null $expr Enum case expression:

list<AttributeGroup> $attrGroups PHP attribute groups:

array<string, mixed> $attributes Additional attributes:

File

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

Class

EnumCase

Namespace

PhpParser\Node\Stmt

Code

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;
}

API Navigation

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