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
Namespace
PhpParser\NodeCode
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;
}