MediaWiki  REL1_20
HttpStatus.php
Go to the documentation of this file.
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                         500 => 'Internal Server Error',
00079                         501 => 'Not Implemented',
00080                         502 => 'Bad Gateway',
00081                         503 => 'Service Unavailable',
00082                         504 => 'Gateway Timeout',
00083                         505 => 'HTTP Version Not Supported',
00084                         507 => 'Insufficient Storage'
00085                 );
00086                 return isset( $statusMessage[$code] ) ? $statusMessage[$code] : null;
00087         }
00088 
00089 }