cloudformation-plus-plus: cfn template preprocessor
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

64 lines
936 B

<?php
declare(strict_types=1);
namespace App\Dom;
/**
* Node in a document that contains a value.
*
* @author Adam Pippin <hello@adampippin.ca>
*/
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;
}
}