MediaWiki
1.33.0
|
Generic wrapper for template functions, with interface compatible with what we use of PHPTAL 0.7. More...
Public Member Functions | |
__construct (Config $config=null) | |
execute () | |
Main function, used by classes that subclass QuickTemplate to show the actual HTML output. More... | |
extend ( $name, $value) | |
extends the value of data with name $name with the value $value More... | |
get ( $name, $default=null) | |
Gets the template data requested. More... | |
getHTML () | |
Fetch the output of a QuickTemplate and return it. More... | |
getSkin () | |
Get the Skin object related to this object. More... | |
haveData ( $str) | |
haveMsg ( $msgKey) | |
html ( $str) | |
msg ( $msgKey) | |
msgHtml ( $msgKey) | |
msgWiki ( $msgKey) | |
An ugly, ugly hack. More... | |
set ( $name, $value) | |
Sets the value $value to $name. More... | |
setRef ( $name, &$value) | |
text ( $str) | |
Public Attributes | |
array | $data |
Protected Attributes | |
$config | |
Generic wrapper for template functions, with interface compatible with what we use of PHPTAL 0.7.
Definition at line 27 of file QuickTemplate.php.
|
abstract |
Main function, used by classes that subclass QuickTemplate to show the actual HTML output.
Reimplemented in SkinFallbackTemplate, MonoBookTemplate, VectorTemplate, SkinApiTemplate, and TimelessTemplate.
Referenced by getHTML().
QuickTemplate::extend | ( | $name, | |
$value | |||
) |
extends the value of data with name $name with the value $value
string | $name | |
mixed | $value |
Definition at line 64 of file QuickTemplate.php.
References $name, $value, data, and haveData().
QuickTemplate::get | ( | $name, | |
$default = null |
|||
) |
Gets the template data requested.
string | $name | Key for the data |
mixed | null | $default | Optional default (or null) |
Definition at line 80 of file QuickTemplate.php.
QuickTemplate::getHTML | ( | ) |
Fetch the output of a QuickTemplate and return it.
Definition at line 189 of file QuickTemplate.php.
QuickTemplate::getSkin | ( | ) |
Get the Skin object related to this object.
Definition at line 179 of file QuickTemplate.php.
References data.
Referenced by TimelessTemplate\execute(), VectorTemplate\execute(), MonoBookTemplate\execute(), MonoBookTemplate\getBox(), TimelessTemplate\getCategories(), BaseTemplate\getFooter(), TimelessTemplate\getLogo(), BaseTemplate\getMsg(), TimelessTemplate\getPageTools(), MonoBookTemplate\getSimpleFooter(), BaseTemplate\getTrail(), and TimelessTemplate\getUserLinks().
QuickTemplate::haveData | ( | $str | ) |
string | $str |
Definition at line 159 of file QuickTemplate.php.
References data.
Referenced by extend().
QuickTemplate::haveMsg | ( | $msgKey | ) |
string | $msgKey |
Definition at line 169 of file QuickTemplate.php.
References wfMessage().
QuickTemplate::html | ( | $str | ) |
string | $str | @suppress SecurityCheck-XSS phan-taint-check cannot tell if $str is pre-escaped |
Definition at line 116 of file QuickTemplate.php.
References data.
Referenced by SkinApiTemplate\execute(), and SkinFallbackTemplate\execute().
QuickTemplate::msg | ( | $msgKey | ) |
string | $msgKey |
Reimplemented in BaseTemplate.
Definition at line 124 of file QuickTemplate.php.
References text(), and wfMessage().
QuickTemplate::msgHtml | ( | $msgKey | ) |
string | $msgKey |
Reimplemented in BaseTemplate.
Definition at line 136 of file QuickTemplate.php.
References wfDeprecated(), and wfMessage().
QuickTemplate::msgWiki | ( | $msgKey | ) |
An ugly, ugly hack.
string | $msgKey |
Reimplemented in BaseTemplate.
Definition at line 146 of file QuickTemplate.php.
References $wgOut, and wfMessage().
QuickTemplate::set | ( | $name, | |
$value | |||
) |
Sets the value $value to $name.
string | $name | |
mixed | $value |
Definition at line 54 of file QuickTemplate.php.
QuickTemplate::setRef | ( | $name, | |
& | $value | ||
) |
The use of references here makes the code more fragile and is incompatible with plans like T140664. Use set() instead.
string | $name | |
mixed | &$value |
Definition at line 91 of file QuickTemplate.php.
References $name, $value, data, and wfDeprecated().
QuickTemplate::text | ( | $str | ) |
string | $str | @suppress SecurityCheck-DoubleEscaped $this->data can be either |
Definition at line 107 of file QuickTemplate.php.
References data.
Referenced by MonoBookTemplate\execute(), TimelessTemplate\getSidebarChunk(), and msg().
|
protected |
Definition at line 35 of file QuickTemplate.php.
Referenced by __construct().
array QuickTemplate::$data |
Definition at line 32 of file QuickTemplate.php.