* Write a unittest for RootControler
[hoplite.git] / http / response_code.php
1 <?php
2 // Hoplite
3 // Copyright (c) 2011 Blue Static
4 //
5 // This program is free software: you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free
7 // Software Foundation, either version 3 of the License, or any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 // more details.
13 //
14 // You should have received a copy of the GNU General Public License along with
15 // this program. If not, see <http://www.gnu.org/licenses/>.
16
17 namespace hoplite\http;
18
19 /*!
20 An enumeration of all the HTTP status codes as constants. This is the complete
21 list of codes. Not all will be usable by an application.
22 @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
23 */
24 class ResponseCode
25 {
26 const HTTP_CONTINUE = 100; // CONTINUE is a keyword.
27 const SWITCHING_PROTOCOLS = 101;
28 const OK = 200;
29 const CREATED = 201;
30 const ACCEPTED = 202;
31 const NO_CONTENT = 204;
32 const RESET_CONTENT = 205;
33 const PARTIAL_CONTENT = 206;
34 const MULTIPLE_CHOICES = 300;
35 const MOVED_PERMANENTLY = 301;
36 const FOUND = 302;
37 const SEE_OTHER = 303;
38 const NOT_MODIFIED = 304;
39 const USE_PROXY = 305;
40 const TEMPORARY_REDIRECT = 307;
41 const BAD_REQUEST = 400;
42 const UNAUTHORIZED = 401;
43 const PAYMENT_REQUIRED = 402;
44 const FORBIDDEN = 403;
45 const NOT_FOUND = 404;
46 const METHOD_NOT_ALLOWED = 405;
47 const NOT_ACCEPTABLE = 406;
48 const PROXY_AUTHENTICATION_REQUIRED = 407;
49 const REQUEST_TIMEOUT = 408;
50 const CONFLICT = 409;
51 const GONE = 410;
52 const LENGTH_REQUIRED = 411;
53 const PRECONDITION_FAILED = 412;
54 const REQUEST_ENTITY_TOO_LARGE = 413;
55 const UNSUPPORTED_MEDIA_TYPE = 415;
56 const REQUESTED_RANGE_NOT_SATISFIABLE = 416;
57 const EXPECTATION_FAILED = 417;
58 const INTERNAL_SERVER_ERROR = 500;
59 const NOT_IMPLEMENTED = 501;
60 const BAD_GATEWAY = 502;
61 const SERVICE_UNAVAILABLE = 503;
62 const GATEWAY_TIMEOUT = 504;
63 const HTTP_VERSION_NOT_SUPPORTED = 505;
64 }