BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
HttpError Class Reference
Inheritance diagram for HttpError:
Collaboration diagram for HttpError:

Public Member Functions

 __construct ($httpCode, $content, $header=null)
 
 isLoggable ()
 
 getStatusCode ()
 
 report ()
 
 getHTML ()
 
- Public Member Functions inherited from MWException
 useOutputPage ()
 
 isLoggable ()
 
 useMessageCache ()
 
 msg ($key, $fallback)
 
 getHTML ()
 
 getText ()
 
 getPageTitle ()
 
 reportHTML ()
 
 report ()
 
- Public Member Functions inherited from Exception
 __construct ($message="", $code=0, Throwable $previous=null)
 
 getMessage ()
 
 getCode ()
 
 getFile ()
 
 getLine ()
 
 getTrace ()
 
 getPrevious ()
 
 getTraceAsString ()
 
 __toString ()
 

Public Attributes

 $header
 
 $content
 

Additional Inherited Members

- Static Public Member Functions inherited from MWException
static isCommandLine ()
 
- Protected Attributes inherited from Exception
 $message
 
 $code
 
 $file
 
 $line
 

Detailed Description

Show an error that looks like an HTTP server error. Replacement for wfHttpError().

Since
1.19

Constructor & Destructor Documentation

HttpError::__construct (   $httpCode,
  $content,
  $header = null 
)
Parameters
int$httpCodeHTTP status code to send to the client
string | Message$contentContent of the message
string | Message | null$headerContent of the header (<title> and <h1>)

Member Function Documentation

HttpError::getHTML ( )

Returns HTML for reporting the HTTP error. This will be a minimal but complete HTML document.

Returns
string HTML
HttpError::getStatusCode ( )

Returns the HTTP status code supplied to the constructor.

Returns
int
HttpError::isLoggable ( )

We don't want the default exception logging as we got our own logging set up in self::report.

See Also
MWException::isLoggable
Since
1.24
Returns
bool
HttpError::report ( )

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


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