| 1 | <?php declare(strict_types = 1); |
||
| 15 | class ScalarSchema extends Schema |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | protected $type; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string|null |
||
| 24 | */ |
||
| 25 | protected $format; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * ScalarSchema constructor. |
||
| 29 | */ |
||
| 30 | public function __construct(\stdClass $definition) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return bool |
||
| 38 | */ |
||
| 39 | public function isDateTime(): bool |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getFormat() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $format |
||
| 55 | * |
||
| 56 | * @return bool |
||
| 57 | */ |
||
| 58 | public function hasFormat(string $format): bool |
||
| 62 | } |
||
| 63 |