1 | <?php |
||
12 | class JsonSchemaValidatorFactory |
||
13 | { |
||
14 | /** |
||
15 | * @var KernelInterface |
||
16 | */ |
||
17 | protected $kernel; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $registeredSchemas; |
||
23 | |||
24 | 1 | public function __construct(KernelInterface $kernel) |
|
29 | |||
30 | /** |
||
31 | * @throws \RuntimeException When schema with provided $id is already registered |
||
32 | */ |
||
33 | 1 | public function registerSchema(string $id, string $schemaResourceLocation): self |
|
43 | |||
44 | 1 | public function hasSchema(string $id): bool |
|
48 | |||
49 | /** |
||
50 | * @throws \RuntimeException |
||
51 | * @throws \InvalidArgumentException |
||
52 | */ |
||
53 | public function getValidator(string $id): JsonSchemaValidator |
||
65 | |||
66 | /** |
||
67 | * @throws \RuntimeException |
||
68 | * @throws \InvalidArgumentException |
||
69 | */ |
||
70 | protected function createSchema(string $id): \stdClass |
||
84 | } |
||
85 |