MediaWiki  1.30.0
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

Definition at line 5 of file HeaderCallback.php.

Member Function Documentation

◆ callback()

static MediaWiki\HeaderCallback::callback ( )
static

The callback, which is called by the transport.

Definition at line 21 of file HeaderCallback.php.

References $header, $name, $value, as, WebRequest\getGlobalRequestURL(), MediaWiki\Logger\LoggerFactory\getInstance(), and list.

◆ 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.

Definition at line 14 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.

Definition at line 57 of file HeaderCallback.php.

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

Referenced by WebResponse\header(), and HttpStatus\header().

Member Data Documentation

◆ $headersSentException

MediaWiki\HeaderCallback::$headersSentException
staticprivate

Definition at line 6 of file HeaderCallback.php.

◆ $messageSent

MediaWiki\HeaderCallback::$messageSent = false
staticprivate

Definition at line 7 of file HeaderCallback.php.


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