function Identifier::__construct
Constructs an identifier node.
Parameters
string $name Identifier as string:
array<string, mixed> $attributes Additional attributes:
Overrides NodeAbstract::__construct
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Identifier.php, line 30
Class
- Identifier
- Represents a non-namespaced name. Namespaced names are represented using Name nodes.
Namespace
PhpParser\NodeCode
public function __construct(string $name, array $attributes = []) {
if ($name === '') {
throw new \InvalidArgumentException('Identifier name cannot be empty');
}
$this->attributes = $attributes;
$this->name = $name;
}