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

Breadcrumb

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

function DeclareItem::__construct

Constructs a declare key=>value pair node.

Parameters

string|Node\Identifier $key Key:

Node\Expr $value Value:

array<string, mixed> $attributes Additional attributes:

Overrides NodeAbstract::__construct

File

vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php, line 21

Class

DeclareItem

Namespace

PhpParser\Node

Code

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