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

Breadcrumb

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

function UseItem::__construct

Constructs an alias (use) item node.

Parameters

Node\Name $name Namespace/Class to alias:

null|string|Identifier $alias Alias:

Use_::TYPE_* $type Type of the use element (for mixed group use only):

array<string, mixed> $attributes Additional attributes:

Overrides NodeAbstract::__construct

File

vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php, line 27

Class

UseItem

Namespace

PhpParser\Node

Code

public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) {
    $this->attributes = $attributes;
    $this->type = $type;
    $this->name = $name;
    $this->alias = \is_string($alias) ? new Identifier($alias) : $alias;
}
RSS feed
Powered by Drupal