1 | <?php |
||
19 | class ApiProblemResponse extends Response |
||
20 | { |
||
21 | /** |
||
22 | * ApiProblemResponse constructor. |
||
23 | * |
||
24 | * @param Presenter $presenter |
||
25 | */ |
||
26 | public function __construct(Presenter $presenter) |
||
34 | |||
35 | /** |
||
36 | * @param Presenter $presenter |
||
37 | * |
||
38 | * @return string |
||
39 | */ |
||
40 | protected function responseHeader(Presenter $presenter) |
||
44 | |||
45 | /** |
||
46 | * @param $status |
||
47 | * @param $detail |
||
48 | * @param string $title |
||
49 | * @param string $type |
||
50 | * @param array $additionalDetails |
||
51 | * |
||
52 | * @return ApiProblemResponse |
||
53 | */ |
||
54 | public static function json($status, $detail, $title = '', $type = '', array $additionalDetails = []) |
||
58 | |||
59 | /** |
||
60 | * @param Exception $exception |
||
61 | * @param string $title |
||
62 | * @param string $type |
||
63 | * @param array $additionalDetails |
||
64 | * |
||
65 | * @return ApiProblemResponse |
||
66 | */ |
||
67 | public static function fromExceptionToJson( |
||
75 | |||
76 | /** |
||
77 | * @param $status |
||
78 | * @param $detail |
||
79 | * @param string $title |
||
80 | * @param string $type |
||
81 | * @param array $additionalDetails |
||
82 | * |
||
83 | * @return ApiProblemResponse |
||
84 | */ |
||
85 | public static function xml($status, $detail, $title = '', $type = '', array $additionalDetails = []) |
||
89 | |||
90 | /** |
||
91 | * @param Exception $exception |
||
92 | * @param string $title |
||
93 | * @param string $type |
||
94 | * @param array $additionalDetails |
||
95 | * |
||
96 | * @return ApiProblemResponse |
||
97 | */ |
||
98 | public static function fromExceptionToXml( |
||
106 | } |
||
107 |