MediaWiki  1.28.0
WebInstallerOutput Class Reference

Output class modelled on OutputPage. More...

Collaboration diagram for WebInstallerOutput:

Public Member Functions

 __construct (WebInstaller $parent)
 
 addHTML ($html)
 
 addHTMLNoFlush ($html)
 
 addWikiText ($text)
 
 allowFrames ($allow=true)
 
 flush ()
 
 getCSS ()
 Get the stylesheet of the MediaWiki skin. More...
 
 getDir ()
 
 getHeadAttribs ()
 
 getJQuery ()
 
 getLanguageCode ()
 
 headerDone ()
 Get whether the header has been output. More...
 
 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. More...
 
WebInstaller $parent
 The WebInstaller object this WebInstallerOutput is used by. More...
 
string $redirectTarget
 

Private Member Functions

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

Private Attributes

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

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 35 of file WebInstallerOutput.php.

Constructor & Destructor Documentation

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

Definition at line 78 of file WebInstallerOutput.php.

References $parent.

Member Function Documentation

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

Definition at line 85 of file WebInstallerOutput.php.

References $html, contents, and flush().

Referenced by addWikiText().

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

Definition at line 100 of file WebInstallerOutput.php.

References $html, and contents.

WebInstallerOutput::addWikiText (   $text)
Parameters
string$text

Definition at line 93 of file WebInstallerOutput.php.

References addHTML().

WebInstallerOutput::allowFrames (   $allow = true)

Definition at line 197 of file WebInstallerOutput.php.

Referenced by outputHeader().

WebInstallerOutput::flush ( )

Definition at line 201 of file WebInstallerOutput.php.

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

Referenced by addHTML(), and output().

WebInstallerOutput::getCSS ( )

Get the stylesheet of the MediaWiki skin.

Returns
string

Definition at line 129 of file WebInstallerOutput.php.

References $resourceLoader, $wgStyleDirectory, as, getLanguageCode(), global, and ResourceLoader\makeCombinedStyles().

WebInstallerOutput::getCssUrl ( )
private

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

Returns
string

Definition at line 189 of file WebInstallerOutput.php.

References Html\linkedStyle().

Referenced by outputHeader(), and outputShortHeader().

WebInstallerOutput::getDir ( )
Returns
string

Definition at line 215 of file WebInstallerOutput.php.

References $wgLang, and global.

Referenced by getHeadAttribs(), and outputHeader().

WebInstallerOutput::getHeadAttribs ( )
Returns
string[]

Definition at line 233 of file WebInstallerOutput.php.

References getDir(), getLanguageCode(), and wfBCP47().

Referenced by outputHeader(), and outputShortHeader().

WebInstallerOutput::getJQuery ( )
Returns
string

Definition at line 344 of file WebInstallerOutput.php.

References Html\linkedScript().

Referenced by outputHeader(), and outputShortHeader().

WebInstallerOutput::getLanguageCode ( )
Returns
string

Definition at line 224 of file WebInstallerOutput.php.

References $wgLang, and global.

Referenced by getCSS(), and getHeadAttribs().

WebInstallerOutput::headerDone ( )

Get whether the header has been output.

Returns
bool

Definition at line 245 of file WebInstallerOutput.php.

References $headerDone.

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

WebInstallerOutput::output ( )

Definition at line 116 of file WebInstallerOutput.php.

References flush(), and outputFooter().

WebInstallerOutput::outputFooter ( )

Definition at line 290 of file WebInstallerOutput.php.

References $section, as, Html\closeElement(), href, php, style, title, useShortHeader(), and wfMessage().

Referenced by output().

WebInstallerOutput::outputShortHeader ( )
WebInstallerOutput::outputTitle ( )

Definition at line 336 of file WebInstallerOutput.php.

References $wgVersion, global, and wfMessage().

Referenced by outputHeader(), and outputShortHeader().

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

Definition at line 109 of file WebInstallerOutput.php.

References headerDone().

WebInstallerOutput::useShortHeader (   $use = true)

Definition at line 193 of file WebInstallerOutput.php.

Referenced by outputFooter(), and outputHeader().

Member Data Documentation

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 67 of file WebInstallerOutput.php.

string WebInstallerOutput::$contents = ''
private

Buffered contents that haven't been output yet.

Definition at line 48 of file WebInstallerOutput.php.

Referenced by flush().

bool WebInstallerOutput::$headerDone = false
private

Has the header (or short header) been output?

Definition at line 54 of file WebInstallerOutput.php.

Referenced by headerDone().

WebInstaller WebInstallerOutput::$parent

The WebInstaller object this WebInstallerOutput is used by.

Definition at line 42 of file WebInstallerOutput.php.

Referenced by __construct().

string WebInstallerOutput::$redirectTarget

Definition at line 59 of file WebInstallerOutput.php.

bool WebInstallerOutput::$useShortHeader = false
private

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

Definition at line 73 of file WebInstallerOutput.php.


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