MediaWiki REL1_35
WebInstallerOutput Class Reference

Output class modelled on OutputPage. More...

Collaboration diagram for WebInstallerOutput:

Public Member Functions

 __construct (WebInstaller $parent)
 
 addHTML ( $html)
 
 addHTMLNoFlush ( $html)
 
 addWikiTextAsInterface ( $text)
 
 allowFrames ( $allow=true)
 
 flush ()
 
 getCSS ()
 Get the stylesheet of the MediaWiki skin.
 
 getHeadAttribs ()
 
 getJQuery ()
 
 headerDone ()
 Get whether the header has been output.
 
 output ()
 
 outputFooter ()
 
 outputHeader ()
 
 outputShortHeader ()
 
 outputTitle ()
 
 redirect ( $url)
 
 useShortHeader ( $use=true)
 

Public Attributes

bool $allowFrames = false
 Does the current page need to allow being used as a frame? If not, X-Frame-Options will be output to forbid it.
 
WebInstaller $parent
 The WebInstaller object this WebInstallerOutput is used by.
 
string $redirectTarget
 

Private Member Functions

 getCssUrl ()
 "<link>" to index.php?css=1 for the "<head>"
 
 getLanguage ()
 

Private Attributes

string $contents = ''
 Buffered contents that haven't been output yet.
 
bool $headerDone = false
 Has the header (or short header) been output?
 
bool $useShortHeader = false
 Whether to use the limited header (used during CC license callbacks)
 

Detailed Description

Output class modelled on OutputPage.

I've opted to use a distinct class rather than derive from OutputPage here in the interests of separation of concerns: if we used a subclass, there would be quite a lot of things you could do in OutputPage that would break the installer, that wouldn't be immediately obvious.

Since
1.17

Definition at line 38 of file WebInstallerOutput.php.

Constructor & Destructor Documentation

◆ __construct()

WebInstallerOutput::__construct ( WebInstaller  $parent)
Parameters
WebInstaller$parent

Definition at line 81 of file WebInstallerOutput.php.

References $parent.

Member Function Documentation

◆ addHTML()

WebInstallerOutput::addHTML (   $html)
Parameters
string$html

Definition at line 88 of file WebInstallerOutput.php.

References flush().

Referenced by addWikiTextAsInterface().

◆ addHTMLNoFlush()

WebInstallerOutput::addHTMLNoFlush (   $html)
Parameters
string$html

Definition at line 104 of file WebInstallerOutput.php.

◆ addWikiTextAsInterface()

WebInstallerOutput::addWikiTextAsInterface (   $text)
Parameters
string$text
Since
1.32

Definition at line 97 of file WebInstallerOutput.php.

References addHTML().

◆ allowFrames()

WebInstallerOutput::allowFrames (   $allow = true)

Definition at line 181 of file WebInstallerOutput.php.

References allowFrames().

Referenced by allowFrames(), and outputHeader().

◆ flush()

WebInstallerOutput::flush ( )

Definition at line 185 of file WebInstallerOutput.php.

References $contents, flush(), headerDone(), and outputHeader().

Referenced by addHTML(), flush(), and output().

◆ getCSS()

WebInstallerOutput::getCSS ( )

Get the stylesheet of the MediaWiki skin.

Returns
string

Definition at line 133 of file WebInstallerOutput.php.

References getLanguage(), and ResourceLoader\makeCombinedStyles().

◆ getCssUrl()

WebInstallerOutput::getCssUrl ( )
private

"<link>" to index.php?css=1 for the "<head>"

Returns
string

Definition at line 173 of file WebInstallerOutput.php.

Referenced by outputHeader(), and outputShortHeader().

◆ getHeadAttribs()

WebInstallerOutput::getHeadAttribs ( )
Returns
string[]

Definition at line 210 of file WebInstallerOutput.php.

References getLanguage().

Referenced by outputHeader(), and outputShortHeader().

◆ getJQuery()

WebInstallerOutput::getJQuery ( )
Returns
string

Definition at line 335 of file WebInstallerOutput.php.

Referenced by outputHeader(), and outputShortHeader().

◆ getLanguage()

WebInstallerOutput::getLanguage ( )
private
Since
1.33
Returns
Language

Definition at line 200 of file WebInstallerOutput.php.

References $wgLang.

Referenced by getCSS(), getHeadAttribs(), and outputHeader().

◆ headerDone()

WebInstallerOutput::headerDone ( )

Get whether the header has been output.

Returns
bool

Definition at line 222 of file WebInstallerOutput.php.

References $headerDone.

Referenced by flush(), outputHeader(), and redirect().

◆ output()

WebInstallerOutput::output ( )

Definition at line 120 of file WebInstallerOutput.php.

References flush(), and outputFooter().

◆ outputFooter()

WebInstallerOutput::outputFooter ( )

Definition at line 268 of file WebInstallerOutput.php.

References useShortHeader(), and wfMessage().

Referenced by output().

◆ outputHeader()

WebInstallerOutput::outputHeader ( )

◆ outputShortHeader()

WebInstallerOutput::outputShortHeader ( )

Definition at line 311 of file WebInstallerOutput.php.

References getCssUrl(), getHeadAttribs(), getJQuery(), and outputTitle().

Referenced by outputHeader().

◆ outputTitle()

WebInstallerOutput::outputTitle ( )

Definition at line 328 of file WebInstallerOutput.php.

References MW_VERSION, and wfMessage().

Referenced by outputHeader(), and outputShortHeader().

◆ redirect()

WebInstallerOutput::redirect (   $url)
Parameters
string$url
Exceptions
MWException

Definition at line 113 of file WebInstallerOutput.php.

References headerDone().

◆ useShortHeader()

WebInstallerOutput::useShortHeader (   $use = true)

Definition at line 177 of file WebInstallerOutput.php.

References useShortHeader().

Referenced by outputFooter(), outputHeader(), and useShortHeader().

Member Data Documentation

◆ $allowFrames

bool WebInstallerOutput::$allowFrames = false

Does the current page need to allow being used as a frame? If not, X-Frame-Options will be output to forbid it.

Definition at line 70 of file WebInstallerOutput.php.

◆ $contents

string WebInstallerOutput::$contents = ''
private

Buffered contents that haven't been output yet.

Definition at line 51 of file WebInstallerOutput.php.

Referenced by flush().

◆ $headerDone

bool WebInstallerOutput::$headerDone = false
private

Has the header (or short header) been output?

Definition at line 57 of file WebInstallerOutput.php.

Referenced by headerDone().

◆ $parent

WebInstaller WebInstallerOutput::$parent

The WebInstaller object this WebInstallerOutput is used by.

Definition at line 45 of file WebInstallerOutput.php.

Referenced by __construct().

◆ $redirectTarget

string WebInstallerOutput::$redirectTarget

Definition at line 62 of file WebInstallerOutput.php.

◆ $useShortHeader

bool WebInstallerOutput::$useShortHeader = false
private

Whether to use the limited header (used during CC license callbacks)

Definition at line 76 of file WebInstallerOutput.php.


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