1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?php /** * Klein (klein.php) - A fast & flexible router for PHP * * @author Chris O'Hara <cohara87@gmail.com> * @author Trevor Suarez (Rican7) (contributor and v2 refactorer) * @copyright (c) Chris O'Hara * @link https://github.com/klein/klein.php * @license MIT */
namespace Klein\Exceptions;
use RuntimeException;
/** * HttpException * * An HTTP error exception */ class HttpException extends RuntimeException implements HttpExceptionInterface {
/** * Methods */
/** * Create an HTTP exception from nothing but an HTTP code * * @param int $code * @return HttpException */ public static function createFromCode($code) { return new static(null, (int) $code); } }
|