function Const_::__construct
Same name in this branch
- 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
Namespace
PhpParser\NodeCode
public function __construct($name, Expr $value, array $attributes = []) {
$this->attributes = $attributes;
$this->name = \is_string($name) ? new Identifier($name) : $name;
$this->value = $value;
}