1 | <?php |
||
16 | abstract class ApiException extends HttpException |
||
17 | { |
||
18 | /** |
||
19 | * The HTTP status code. |
||
20 | * |
||
21 | * @var int |
||
22 | */ |
||
23 | protected $statusCode = 500; |
||
24 | |||
25 | /** |
||
26 | * The error code. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $errorCode = 'error_occurred'; |
||
31 | |||
32 | /** |
||
33 | * Constructor. |
||
34 | * |
||
35 | * @param mixed $message |
||
36 | */ |
||
37 | public function __construct($message = null) |
||
41 | |||
42 | /** |
||
43 | * Get the HTTP status code, |
||
44 | * |
||
45 | * @return int |
||
46 | */ |
||
47 | public function getStatusCode() |
||
51 | |||
52 | /** |
||
53 | * Get the error code. |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getErrorCode() |
||
61 | |||
62 | /** |
||
63 | * Get the error data. |
||
64 | * |
||
65 | * @return array|null |
||
66 | */ |
||
67 | public function getData() |
||
71 | } |