Exception
11 months ago
BinaryValue.php
11 months ago
DynamoDbClient.php
11 months ago
LockingSessionConnection.php
11 months ago
Marshaler.php
11 months ago
NumberValue.php
11 months ago
SessionConnectionConfigTrait.php
11 months ago
SessionConnectionInterface.php
11 months ago
SessionHandler.php
11 months ago
SetValue.php
11 months ago
StandardSessionConnection.php
11 months ago
WriteRequestBatch.php
11 months ago
NumberValue.php
31 lines
| 1 | <?php |
| 2 | namespace Aws\DynamoDb; |
| 3 | |
| 4 | /** |
| 5 | * Special object to represent a DynamoDB Number (N) value. |
| 6 | */ |
| 7 | class NumberValue implements \JsonSerializable |
| 8 | { |
| 9 | /** @var string Number value. */ |
| 10 | private $value; |
| 11 | |
| 12 | /** |
| 13 | * @param string|int|float $value A number value. |
| 14 | */ |
| 15 | public function __construct($value) |
| 16 | { |
| 17 | $this->value = (string) $value; |
| 18 | } |
| 19 | |
| 20 | #[\ReturnTypeWillChange] |
| 21 | public function jsonSerialize() |
| 22 | { |
| 23 | return $this->value; |
| 24 | } |
| 25 | |
| 26 | public function __toString() |
| 27 | { |
| 28 | return $this->value; |
| 29 | } |
| 30 | } |
| 31 |