1 | <?php |
||
32 | class HttpException extends \Exception implements StatusCode |
||
33 | { |
||
34 | /** |
||
35 | * The standard HTTP 1.1 prefix. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | const HTTP1_1_PREFIX = 'HTTP/1.1'; |
||
40 | /** |
||
41 | * Simple magic so you can use the Exception directly as a string, for |
||
42 | * example in header();. |
||
43 | * |
||
44 | * @return string A fully valid status header |
||
45 | */ |
||
46 | public function __toString() |
||
52 | |||
53 | /** |
||
54 | * Render the code and message (in whole or in part) as a valid |
||
55 | * response status header. |
||
56 | * |
||
57 | * @param bool $prependHttp Whether to prepend the HTTP/1.1 prefix |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function render($prependHttp = true) |
||
70 | } |
||
71 |