MediaWiki
REL1_23
|
00001 <?php 00026 class HttpStatus { 00027 00037 public static function getMessage( $code ) { 00038 static $statusMessage = array( 00039 100 => 'Continue', 00040 101 => 'Switching Protocols', 00041 102 => 'Processing', 00042 200 => 'OK', 00043 201 => 'Created', 00044 202 => 'Accepted', 00045 203 => 'Non-Authoritative Information', 00046 204 => 'No Content', 00047 205 => 'Reset Content', 00048 206 => 'Partial Content', 00049 207 => 'Multi-Status', 00050 300 => 'Multiple Choices', 00051 301 => 'Moved Permanently', 00052 302 => 'Found', 00053 303 => 'See Other', 00054 304 => 'Not Modified', 00055 305 => 'Use Proxy', 00056 307 => 'Temporary Redirect', 00057 400 => 'Bad Request', 00058 401 => 'Unauthorized', 00059 402 => 'Payment Required', 00060 403 => 'Forbidden', 00061 404 => 'Not Found', 00062 405 => 'Method Not Allowed', 00063 406 => 'Not Acceptable', 00064 407 => 'Proxy Authentication Required', 00065 408 => 'Request Timeout', 00066 409 => 'Conflict', 00067 410 => 'Gone', 00068 411 => 'Length Required', 00069 412 => 'Precondition Failed', 00070 413 => 'Request Entity Too Large', 00071 414 => 'Request-URI Too Large', 00072 415 => 'Unsupported Media Type', 00073 416 => 'Request Range Not Satisfiable', 00074 417 => 'Expectation Failed', 00075 422 => 'Unprocessable Entity', 00076 423 => 'Locked', 00077 424 => 'Failed Dependency', 00078 428 => 'Precondition Required', 00079 429 => 'Too Many Requests', 00080 431 => 'Request Header Fields Too Large', 00081 500 => 'Internal Server Error', 00082 501 => 'Not Implemented', 00083 502 => 'Bad Gateway', 00084 503 => 'Service Unavailable', 00085 504 => 'Gateway Timeout', 00086 505 => 'HTTP Version Not Supported', 00087 507 => 'Insufficient Storage', 00088 511 => 'Network Authentication Required', 00089 ); 00090 return isset( $statusMessage[$code] ) ? $statusMessage[$code] : null; 00091 } 00092 00093 }