MediaWiki  master
MediaWiki\HeaderCallback Class Reference

Static Public Member Functions

static callback ()
 The callback, which is called by the transport. More...
 
static register ()
 Register a callback to be called when headers are sent. More...
 
static warnIfHeadersSent ()
 Log a warning message if headers have already been sent. More...
 

Static Private Attributes

static $headersSentException
 
static $messageSent = false
 

Detailed Description

Since
1.29

Definition at line 8 of file HeaderCallback.php.

Member Function Documentation

◆ callback()

static MediaWiki\HeaderCallback::callback ( )
static

The callback, which is called by the transport.

Since
1.29

Definition at line 28 of file HeaderCallback.php.

References $header, WebRequest\getGlobalRequestURL(), and MediaWiki\Logger\LoggerFactory\getInstance().

◆ register()

static MediaWiki\HeaderCallback::register ( )
static

Register a callback to be called when headers are sent.

There can only be one of these handlers active, so all relevant actions have to be in here.

Since
1.29

Definition at line 19 of file HeaderCallback.php.

◆ warnIfHeadersSent()

static MediaWiki\HeaderCallback::warnIfHeadersSent ( )
static

Log a warning message if headers have already been sent.

This can be called before flushing the output.

Since
1.29

Definition at line 70 of file HeaderCallback.php.

References MediaWiki\Logger\LoggerFactory\getInstance(), MWDebug\warning(), and wfGetCaller().

Referenced by WebResponse\header(), HttpStatus\header(), ResourceLoader\sendResponseHeaders(), wfHttpError(), wfProxyThumbnailRequest(), and wfThumbError().

Member Data Documentation

◆ $headersSentException

MediaWiki\HeaderCallback::$headersSentException
staticprivate

Definition at line 9 of file HeaderCallback.php.

◆ $messageSent

MediaWiki\HeaderCallback::$messageSent = false
staticprivate

Definition at line 10 of file HeaderCallback.php.


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