1 | <?php |
||
5 | class InvalidSchemaException extends \RuntimeException |
||
6 | { |
||
7 | /** |
||
8 | * @var string |
||
9 | */ |
||
10 | private $keyword; |
||
11 | |||
12 | /** |
||
13 | * @var string|null |
||
14 | */ |
||
15 | private $pointer; |
||
16 | |||
17 | /** |
||
18 | * @param string $message |
||
19 | * @param string $keyword |
||
20 | * @param string|null $pointer |
||
21 | */ |
||
22 | 78 | public function __construct($message, $keyword, $pointer) |
|
29 | |||
30 | /** |
||
31 | * @param string $actualType |
||
32 | * @param array $allowedTypes |
||
33 | * @param string $keyword |
||
34 | * @param string|null $pointer |
||
35 | * |
||
36 | * @return \League\JsonGuard\Exceptions\InvalidSchemaException |
||
37 | */ |
||
38 | 56 | public static function invalidParameterType($actualType, array $allowedTypes, $keyword, $pointer) |
|
48 | |||
49 | /** |
||
50 | * @param integer $value |
||
51 | * @param string $keyword |
||
52 | * @param string|null $pointer |
||
53 | * |
||
54 | * @return \League\JsonGuard\Exceptions\InvalidSchemaException |
||
55 | */ |
||
56 | 16 | public static function negativeValue($value, $keyword, $pointer) |
|
65 | |||
66 | /** |
||
67 | * @param string $keyword |
||
68 | * @param string|null $pointer |
||
69 | * |
||
70 | * @return \League\JsonGuard\Exceptions\InvalidSchemaException |
||
71 | */ |
||
72 | 6 | public static function emptyArray($keyword, $pointer) |
|
80 | |||
81 | /** |
||
82 | * @return string |
||
83 | */ |
||
84 | public function getKeyword() |
||
88 | |||
89 | /** |
||
90 | * @return string|null |
||
91 | */ |
||
92 | public function getPointer() |
||
96 | } |
||
97 |