1 | <?php |
||
19 | final class JsonSchemaConstraint extends BaseConstraint |
||
20 | { |
||
21 | /** |
||
22 | * @var object |
||
23 | */ |
||
24 | private $schema; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $context; |
||
30 | |||
31 | /** |
||
32 | * @var Validator |
||
33 | */ |
||
34 | private $validator; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | private $errors = []; |
||
40 | |||
41 | /** |
||
42 | * @param object $schema |
||
43 | * @param string|null $context |
||
44 | */ |
||
45 | 5 | public function __construct($schema, $context = null) |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 5 | protected function matches($other) |
|
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | 4 | protected function failureDescription($other) |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | 4 | protected function additionalFailureDescription($other) |
|
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | 4 | public function toString() |
|
87 | } |
||
88 |