1 | <?php |
||
18 | class ProxyException extends \Exception { |
||
19 | |||
20 | /** |
||
21 | * The HTTP status code for this exception that should be sent in the response |
||
22 | */ |
||
23 | public $httpStatusCode = 400; |
||
24 | |||
25 | /** |
||
26 | * If true the server should redirect back to the client |
||
27 | * @var boolean |
||
28 | */ |
||
29 | public $serverShouldRedirect = false; |
||
30 | |||
31 | /** |
||
32 | * The exception type |
||
33 | */ |
||
34 | public $errorType = ''; |
||
35 | |||
36 | /** |
||
37 | * Throw a new exception |
||
38 | */ |
||
39 | public function __construct($msg = 'An error occured') { |
||
42 | |||
43 | /** |
||
44 | * Should the server redirect back to the client? |
||
45 | * @return bool |
||
46 | */ |
||
47 | public function shouldRedirect() { |
||
50 | |||
51 | /** |
||
52 | * Get all headers that have to be send with the error response |
||
53 | * @return array Array with header values |
||
54 | */ |
||
55 | public function getHttpHeaders() { |
||
78 | |||
79 | } |
||
80 |