MediaWiki
REL1_19
|
00001 <?php 00005 class HttpStatus { 00006 00016 public static function getMessage( $code ) { 00017 static $statusMessage = array( 00018 100 => 'Continue', 00019 101 => 'Switching Protocols', 00020 102 => 'Processing', 00021 200 => 'OK', 00022 201 => 'Created', 00023 202 => 'Accepted', 00024 203 => 'Non-Authoritative Information', 00025 204 => 'No Content', 00026 205 => 'Reset Content', 00027 206 => 'Partial Content', 00028 207 => 'Multi-Status', 00029 300 => 'Multiple Choices', 00030 301 => 'Moved Permanently', 00031 302 => 'Found', 00032 303 => 'See Other', 00033 304 => 'Not Modified', 00034 305 => 'Use Proxy', 00035 307 => 'Temporary Redirect', 00036 400 => 'Bad Request', 00037 401 => 'Unauthorized', 00038 402 => 'Payment Required', 00039 403 => 'Forbidden', 00040 404 => 'Not Found', 00041 405 => 'Method Not Allowed', 00042 406 => 'Not Acceptable', 00043 407 => 'Proxy Authentication Required', 00044 408 => 'Request Timeout', 00045 409 => 'Conflict', 00046 410 => 'Gone', 00047 411 => 'Length Required', 00048 412 => 'Precondition Failed', 00049 413 => 'Request Entity Too Large', 00050 414 => 'Request-URI Too Large', 00051 415 => 'Unsupported Media Type', 00052 416 => 'Request Range Not Satisfiable', 00053 417 => 'Expectation Failed', 00054 422 => 'Unprocessable Entity', 00055 423 => 'Locked', 00056 424 => 'Failed Dependency', 00057 500 => 'Internal Server Error', 00058 501 => 'Not Implemented', 00059 502 => 'Bad Gateway', 00060 503 => 'Service Unavailable', 00061 504 => 'Gateway Timeout', 00062 505 => 'HTTP Version Not Supported', 00063 507 => 'Insufficient Storage' 00064 ); 00065 return isset( $statusMessage[$code] ) ? $statusMessage[$code] : null; 00066 } 00067 00068 }