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

Breadcrumb

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

function Const_::__construct

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

Constructs a const node for use in class const and const statements.

Parameters

string|Identifier $name Name:

Expr $value Value:

array<string, mixed> $attributes Additional attributes:

Overrides NodeAbstract::__construct

File

vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php, line 23

Class

Const_

Namespace

PhpParser\Node

Code

public function __construct($name, Expr $value, array $attributes = []) {
    $this->attributes = $attributes;
    $this->name = \is_string($name) ? new Identifier($name) : $name;
    $this->value = $value;
}
RSS feed
Powered by Drupal