| 1 | <?php |
||
| 17 | class Value implements ValueInterface |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var TypeInterface|null |
||
| 21 | */ |
||
| 22 | private $type; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var int|string|null|float|bool|PrimitiveInterface |
||
| 26 | */ |
||
| 27 | private $value; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Value constructor. |
||
| 31 | * @param TypeInterface $type |
||
| 32 | * @param mixed $value |
||
| 33 | */ |
||
| 34 | public function __construct($value, TypeInterface $type) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return int|string|null|float|bool|PrimitiveInterface |
||
| 44 | */ |
||
| 45 | public function getValue() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return TypeInterface |
||
| 52 | */ |
||
| 53 | public function getType(): TypeInterface |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function __toString(): string |
||
| 65 | } |
||
| 66 |