friendship ended with social-app. php is my new best friend
1<?php
2
3namespace Fig\Http\Message;
4
5/**
6 * Defines constants for common HTTP status code.
7 *
8 * @see https://tools.ietf.org/html/rfc2295#section-8.1
9 * @see https://tools.ietf.org/html/rfc2324#section-2.3
10 * @see https://tools.ietf.org/html/rfc2518#section-9.7
11 * @see https://tools.ietf.org/html/rfc2774#section-7
12 * @see https://tools.ietf.org/html/rfc3229#section-10.4
13 * @see https://tools.ietf.org/html/rfc4918#section-11
14 * @see https://tools.ietf.org/html/rfc5842#section-7.1
15 * @see https://tools.ietf.org/html/rfc5842#section-7.2
16 * @see https://tools.ietf.org/html/rfc6585#section-3
17 * @see https://tools.ietf.org/html/rfc6585#section-4
18 * @see https://tools.ietf.org/html/rfc6585#section-5
19 * @see https://tools.ietf.org/html/rfc6585#section-6
20 * @see https://tools.ietf.org/html/rfc7231#section-6
21 * @see https://tools.ietf.org/html/rfc7238#section-3
22 * @see https://tools.ietf.org/html/rfc7725#section-3
23 * @see https://tools.ietf.org/html/rfc7540#section-9.1.2
24 * @see https://tools.ietf.org/html/rfc8297#section-2
25 * @see https://tools.ietf.org/html/rfc8470#section-7
26 * Usage:
27 *
28 * <code>
29 * class ResponseFactory implements StatusCodeInterface
30 * {
31 * public function createResponse($code = self::STATUS_OK)
32 * {
33 * }
34 * }
35 * </code>
36 */
37interface StatusCodeInterface
38{
39 // Informational 1xx
40 const STATUS_CONTINUE = 100;
41 const STATUS_SWITCHING_PROTOCOLS = 101;
42 const STATUS_PROCESSING = 102;
43 const STATUS_EARLY_HINTS = 103;
44 // Successful 2xx
45 const STATUS_OK = 200;
46 const STATUS_CREATED = 201;
47 const STATUS_ACCEPTED = 202;
48 const STATUS_NON_AUTHORITATIVE_INFORMATION = 203;
49 const STATUS_NO_CONTENT = 204;
50 const STATUS_RESET_CONTENT = 205;
51 const STATUS_PARTIAL_CONTENT = 206;
52 const STATUS_MULTI_STATUS = 207;
53 const STATUS_ALREADY_REPORTED = 208;
54 const STATUS_IM_USED = 226;
55 // Redirection 3xx
56 const STATUS_MULTIPLE_CHOICES = 300;
57 const STATUS_MOVED_PERMANENTLY = 301;
58 const STATUS_FOUND = 302;
59 const STATUS_SEE_OTHER = 303;
60 const STATUS_NOT_MODIFIED = 304;
61 const STATUS_USE_PROXY = 305;
62 const STATUS_RESERVED = 306;
63 const STATUS_TEMPORARY_REDIRECT = 307;
64 const STATUS_PERMANENT_REDIRECT = 308;
65 // Client Errors 4xx
66 const STATUS_BAD_REQUEST = 400;
67 const STATUS_UNAUTHORIZED = 401;
68 const STATUS_PAYMENT_REQUIRED = 402;
69 const STATUS_FORBIDDEN = 403;
70 const STATUS_NOT_FOUND = 404;
71 const STATUS_METHOD_NOT_ALLOWED = 405;
72 const STATUS_NOT_ACCEPTABLE = 406;
73 const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
74 const STATUS_REQUEST_TIMEOUT = 408;
75 const STATUS_CONFLICT = 409;
76 const STATUS_GONE = 410;
77 const STATUS_LENGTH_REQUIRED = 411;
78 const STATUS_PRECONDITION_FAILED = 412;
79 const STATUS_PAYLOAD_TOO_LARGE = 413;
80 const STATUS_URI_TOO_LONG = 414;
81 const STATUS_UNSUPPORTED_MEDIA_TYPE = 415;
82 const STATUS_RANGE_NOT_SATISFIABLE = 416;
83 const STATUS_EXPECTATION_FAILED = 417;
84 const STATUS_IM_A_TEAPOT = 418;
85 const STATUS_MISDIRECTED_REQUEST = 421;
86 const STATUS_UNPROCESSABLE_ENTITY = 422;
87 const STATUS_LOCKED = 423;
88 const STATUS_FAILED_DEPENDENCY = 424;
89 const STATUS_TOO_EARLY = 425;
90 const STATUS_UPGRADE_REQUIRED = 426;
91 const STATUS_PRECONDITION_REQUIRED = 428;
92 const STATUS_TOO_MANY_REQUESTS = 429;
93 const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
94 const STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 451;
95 // Server Errors 5xx
96 const STATUS_INTERNAL_SERVER_ERROR = 500;
97 const STATUS_NOT_IMPLEMENTED = 501;
98 const STATUS_BAD_GATEWAY = 502;
99 const STATUS_SERVICE_UNAVAILABLE = 503;
100 const STATUS_GATEWAY_TIMEOUT = 504;
101 const STATUS_VERSION_NOT_SUPPORTED = 505;
102 const STATUS_VARIANT_ALSO_NEGOTIATES = 506;
103 const STATUS_INSUFFICIENT_STORAGE = 507;
104 const STATUS_LOOP_DETECTED = 508;
105 const STATUS_NOT_EXTENDED = 510;
106 const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;
107}