MediaWiki  REL1_24
HttpError Class Reference

Show an error that looks like an HTTP server error. More...

Inheritance diagram for HttpError:
Collaboration diagram for HttpError:

List of all members.

Public Member Functions

 __construct ($httpCode, $content, $header=null)
 Constructor.
 getHTML ()
 Returns HTML for reporting the HTTP error.
 getStatusCode ()
 Returns the HTTP status code supplied to the constructor.
 report ()
 Report the HTTP error.

Public Attributes

 $content
 $header

Private Attributes

 $httpCode

Detailed Description

Show an error that looks like an HTTP server error.

Replacement for wfHttpError().

Since:
1.19

Definition at line 28 of file HttpError.php.


Constructor & Destructor Documentation

HttpError::__construct ( httpCode,
content,
header = null 
)

Constructor.

Parameters:
int$httpCodeHTTP status code to send to the client
string | Message$contentContent of the message
string | Message$headerContent of the header (<title> and <h1>)

Definition at line 38 of file HttpError.php.

References $content, $header, $httpCode, content, and MWException\header().


Member Function Documentation

Returns HTML for reporting the HTTP error.

This will be a minimal but complete HTML document.

Returns:
string HTML

Reimplemented from MWException.

Definition at line 74 of file HttpError.php.

References $content, $header, content, HttpStatus\getMessage(), and MWException\header().

Referenced by report().

Returns the HTTP status code supplied to the constructor.

Returns:
int

Definition at line 50 of file HttpError.php.

Report the HTTP error.

Sends the appropriate HTTP status code and outputs an HTML page with an error message.

Reimplemented from MWException.

Definition at line 59 of file HttpError.php.

References getHTML(), HttpStatus\getMessage(), MWException\header(), and print.


Member Data Documentation

HttpError::$content

Definition at line 29 of file HttpError.php.

Referenced by __construct(), and getHTML().

HttpError::$header

Definition at line 29 of file HttpError.php.

Referenced by __construct(), and getHTML().

HttpError::$httpCode [private]

Definition at line 29 of file HttpError.php.

Referenced by __construct().


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