MediaWiki master
HttpStatus Class Reference

Static Public Member Functions

static getHeader ( $code)
 Construct an HTTP status code header.
 
static getMessage ( $code)
 Get the message associated with an HTTP response status code.
 
static header ( $code)
 Output an HTTP status code header.
 

Detailed Description

Todo
document

Definition at line 26 of file HttpStatus.php.

Member Function Documentation

◆ getHeader()

static HttpStatus::getHeader ( $code)
static

Construct an HTTP status code header.

Since
1.42
Parameters
int$codeStatus code
Returns
string

Definition at line 97 of file HttpStatus.php.

◆ getMessage()

static HttpStatus::getMessage ( $code)
static

Get the message associated with an HTTP response status code.

Parameters
int$codeStatus code
Returns
string|null Message, or null if $code is not known

Definition at line 34 of file HttpStatus.php.

Referenced by MediaWiki\Rest\ResponseFactory\createHttpError(), and MediaWiki\Rest\Response\setStatus().

◆ header()

static HttpStatus::header ( $code)
static

Output an HTTP status code header.

Since
1.26
Parameters
int$codeStatus code

Definition at line 120 of file HttpStatus.php.

Referenced by MediaWiki\Specials\SpecialRunJobs\execute(), and MediaWiki\Request\WebResponse\statusHeader().


The documentation for this class was generated from the following file: