| 1 | <?php namespace Limoncello\Flute\Types; |
||
| 30 | class JsonApiDateTime implements JsonSerializable |
||
| 31 | { |
||
| 32 | /** |
||
| 33 | * @var DateTimeInterface |
||
| 34 | */ |
||
| 35 | private $value; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var string |
||
| 39 | */ |
||
| 40 | private $format; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param DateTimeInterface $value |
||
| 44 | * @param string $format |
||
| 45 | */ |
||
| 46 | public function __construct(DateTimeInterface $value, string $format = DateBaseType::JSON_API_FORMAT) |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return DateTimeInterface |
||
| 54 | */ |
||
| 55 | public function getValue(): DateTimeInterface |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | public function getFormat(): string |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @inheritdoc |
||
| 70 | */ |
||
| 71 | public function jsonSerialize() |
||
| 75 | } |
||
| 76 |