1 <?php namespace Modulework\Modules\Http\Exceptions;
2 /*
3 * (c) Christian Gärtner <christiangaertner.film@googlemail.com>
4 * This file is part of the Modulework Framework
5 * License: View distributed LICENSE file
6 */
7
8 use Exception;
9
10 /**
11 * HttpExceptionInterface
12 * All HTTP releated excpetions should implement this.
13 */
14 interface HttpExceptionInterface
15 {
16 /**
17 * Constructor.
18 *
19 * The message can be be ommited and will be figured out by the Response class.
20 *
21 * @param int $code The http status code
22 * @param string $message The messages
23 * @param \Exceptions $previous Previous exception (if nested)
24 */
25 public function __construct($code = null, $message = null, Exception $previous = null);
26
27 /**
28 * Returns the status code for this exception
29 * @return int The code
30 */
31 public function getStatusCode();
32 }