1 | <?php declare(strict_types = 1); |
||
15 | class ScalarSchema extends Schema |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $format; |
||
21 | |||
22 | /** |
||
23 | * @var array|string |
||
24 | */ |
||
25 | protected $enum; |
||
26 | |||
27 | /** |
||
28 | * @var string|null |
||
29 | */ |
||
30 | protected $pattern; |
||
31 | |||
32 | /** |
||
33 | * ScalarSchema constructor. |
||
34 | * |
||
35 | * @param \stdClass $definition |
||
36 | */ |
||
37 | public function __construct(\stdClass $definition) |
||
44 | |||
45 | /** |
||
46 | * @return bool |
||
47 | */ |
||
48 | public function isDateTime(): bool |
||
53 | |||
54 | /** |
||
55 | * @return array|string |
||
56 | */ |
||
57 | public function getEnum() |
||
61 | |||
62 | /** |
||
63 | * @return null|string |
||
64 | */ |
||
65 | public function getPattern() |
||
69 | |||
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getFormat() |
||
78 | |||
79 | /** |
||
80 | * @param string $format |
||
81 | * |
||
82 | * @return bool |
||
83 | */ |
||
84 | public function hasFormat(string $format): bool |
||
88 | } |
||
89 |