MediaWiki  REL1_20
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.
 report ()
 Output a report about the exception and takes care of formatting.

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 554 of file Exception.php.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
$httpCodeInteger: HTTP status code to send to the client
$contentString|Message: content of the message
$headerString|Message: content of the header (<title> and <h1>)

Definition at line 564 of file Exception.php.

References $content, $header, and $httpCode.


Member Function Documentation

Output a report about the exception and takes care of formatting.

It will be either HTML or plain text based on isCommandLine().

Reimplemented from MWException.

Definition at line 571 of file Exception.php.

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


Member Data Documentation

HttpError::$content

Definition at line 555 of file Exception.php.

Referenced by __construct(), and report().

HttpError::$header

Definition at line 555 of file Exception.php.

Referenced by __construct(), and report().

HttpError::$httpCode [private]

Definition at line 555 of file Exception.php.

Referenced by __construct().


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