*/ class NodeValue extends Node { /** * Value this node holds. * * @var scalar */ protected $value; /** * Create a new node containing a scalar value. * * @param ?Node $parent * @param ?string $name * @param scalar $value */ public function __construct(?Node $parent, ?string $name, $value) { parent::__construct($parent, $name); $this->value = $value; } /** * Set the value of this node. * * @param scalar $value * @return void */ public function setValue($value): void { $this->value = $value; } /** * Get the value of this node. * * @return scalar */ public function getValue() { return $this->value; } public function isMap(): bool { return false; } public function isArray(): bool { return false; } }