1 | <?php |
||
7 | class JsonException extends \Exception |
||
8 | { |
||
9 | /** |
||
10 | * @var |
||
11 | */ |
||
12 | public $statusCode; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $type; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $title; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $detail; |
||
28 | |||
29 | /** |
||
30 | * JsonException constructor. |
||
31 | * |
||
32 | * @param string $type |
||
33 | * @param int $statusCode |
||
34 | * @param string $title |
||
35 | * @param string $detail |
||
36 | */ |
||
37 | public function __construct($type, $statusCode, $title, $detail) |
||
44 | |||
45 | /** |
||
46 | * JsonApi encode error |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | public function encodeError() |
||
63 | } |