MediaWiki REL1_28
|
Show an error that looks like an HTTP server error. More...
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. | |
isLoggable () | |
We don't want the default exception logging as we got our own logging set up in self::report. | |
report () | |
Report and log the HTTP error. | |
Public Member Functions inherited from MWException | |
getPageTitle () | |
Return the title of the page when reporting this error in a HTTP response. | |
getText () | |
Get the text to display when reporting the error on the command line. | |
msg ( $key, $fallback) | |
Get a message from i18n. | |
reportHTML () | |
Output the exception report using HTML. | |
runHooks ( $name, $args=[]) | |
Run hook to allow extensions to modify the text of the exception. | |
useMessageCache () | |
Can the extension use the Message class/wfMessage to get i18n-ed messages? | |
useOutputPage () | |
Should the exception use $wgOut to output the error? | |
Private Member Functions | |
doLog () | |
Private Attributes | |
$content | |
$header | |
$httpCode | |
Additional Inherited Members | |
Static Public Member Functions inherited from MWException | |
static | isCommandLine () |
Check whether we are in command line mode or not to report the exception in the correct format. | |
Show an error that looks like an HTTP server error.
Replacement for wfHttpError().
Definition at line 30 of file HttpError.php.
HttpError::__construct | ( | $httpCode, | |
$content, | |||
$header = null |
|||
) |
Constructor.
int | $httpCode | HTTP status code to send to the client |
string | Message | $content | Content of the message |
string | Message | null | $header | Content of the header (\<title\> and \<h1\>) |
Definition at line 40 of file HttpError.php.
References $content, $header, $httpCode, content, and MWException\header().
|
private |
Definition at line 83 of file HttpError.php.
References $content, $context, $httpCode, and getStatusCode().
Referenced by report().
HttpError::getHTML | ( | ) |
Returns HTML for reporting the HTTP error.
This will be a minimal but complete HTML document.
Reimplemented from MWException.
Definition at line 112 of file HttpError.php.
References content, HttpStatus\getMessage(), and MWException\header().
Referenced by report().
HttpError::getStatusCode | ( | ) |
Returns the HTTP status code supplied to the constructor.
Definition at line 65 of file HttpError.php.
References $httpCode.
Referenced by doLog().
HttpError::isLoggable | ( | ) |
We don't want the default exception logging as we got our own logging set up in self::report.
Reimplemented from MWException.
Definition at line 56 of file HttpError.php.
HttpError::report | ( | ) |
Report and log the HTTP error.
Sends the appropriate HTTP status code and outputs an HTML page with an error message.
Reimplemented from MWException.
Definition at line 74 of file HttpError.php.
References doLog(), getHTML(), HttpStatus\header(), MWException\header(), and print.
|
private |
Definition at line 31 of file HttpError.php.
Referenced by __construct(), and doLog().
|
private |
Definition at line 31 of file HttpError.php.
Referenced by __construct().
|
private |
Definition at line 31 of file HttpError.php.
Referenced by __construct(), doLog(), and getStatusCode().