MediaWiki  1.30.0
QuickTemplate Class Reference

Generic wrapper for template functions, with interface compatible with what we use of PHPTAL 0.7. More...

Inheritance diagram for QuickTemplate:
Collaboration diagram for QuickTemplate:

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 ( $str)
 
 html ( $str)
 
 msg ( $str)
 
 msgHtml ( $str)
 
 msgWiki ( $str)
 An ugly, ugly hack. More...
 
 set ( $name, $value)
 Sets the value $value to $name. More...
 
 setRef ( $name, &$value)
 
 setTranslator (&$t)
 
 text ( $str)
 

Public Attributes

array $data
 
MediaWikiI18N $translator
 

Protected Attributes

 $config
 

Detailed Description

Generic wrapper for template functions, with interface compatible with what we use of PHPTAL 0.7.

Definition at line 27 of file QuickTemplate.php.

Constructor & Destructor Documentation

◆ __construct()

QuickTemplate::__construct ( Config  $config = null)
Parameters
Config$config

Definition at line 45 of file QuickTemplate.php.

References $config, data, and wfDebug().

Member Function Documentation

◆ execute()

QuickTemplate::execute ( )
abstract

Main function, used by classes that subclass QuickTemplate to show the actual HTML output.

Reimplemented in FakeAuthTemplate, SkinFallbackTemplate, ModernTemplate, CologneBlueTemplate, MonoBookTemplate, SkinApiTemplate, and VectorTemplate.

Referenced by getHTML().

◆ extend()

QuickTemplate::extend (   $name,
  $value 
)

extends the value of data with name $name with the value $value

Since
1.25
Parameters
string$name
mixed$value

Definition at line 70 of file QuickTemplate.php.

References $name, $value, data, and haveData().

◆ get()

QuickTemplate::get (   $name,
  $default = null 
)

Gets the template data requested.

Since
1.22
Parameters
string$nameKey for the data
mixed$defaultOptional default (or null)
Returns
mixed The value of the data requested or the deafult

Definition at line 85 of file QuickTemplate.php.

References $name, and data.

◆ getHTML()

QuickTemplate::getHTML ( )

Fetch the output of a QuickTemplate and return it.

Since
1.23
Returns
string

Definition at line 193 of file QuickTemplate.php.

References $html, and execute().

◆ getSkin()

◆ haveData()

QuickTemplate::haveData (   $str)
Access:\n private
Parameters
string$str
Returns
bool

Definition at line 163 of file QuickTemplate.php.

References data.

Referenced by extend(), and FakeAuthTemplate\getExtraInputDefinitions().

◆ haveMsg()

QuickTemplate::haveMsg (   $str)
Access:\n private
Parameters
string$str
Returns
bool

Definition at line 173 of file QuickTemplate.php.

◆ html()

QuickTemplate::html (   $str)
Access:\n private
Parameters
string$str

Definition at line 126 of file QuickTemplate.php.

References data.

Referenced by SkinApiTemplate\execute(), CologneBlueTemplate\execute(), and SkinFallbackTemplate\execute().

◆ msg()

QuickTemplate::msg (   $str)
Access:\n private
Parameters
string$str

Reimplemented in BaseTemplate.

Definition at line 134 of file QuickTemplate.php.

◆ msgHtml()

QuickTemplate::msgHtml (   $str)
Access:\n private
Parameters
string$str

Reimplemented in BaseTemplate.

Definition at line 142 of file QuickTemplate.php.

◆ msgWiki()

QuickTemplate::msgWiki (   $str)

An ugly, ugly hack.

Access:\n private
Parameters
string$str

Reimplemented in BaseTemplate.

Definition at line 151 of file QuickTemplate.php.

References $wgOut, and global.

◆ set()

QuickTemplate::set (   $name,
  $value 
)

Sets the value $value to $name.

Parameters
string$name
mixed$value

Definition at line 60 of file QuickTemplate.php.

References $name, $value, and data.

◆ setRef()

QuickTemplate::setRef (   $name,
$value 
)
Parameters
string$name
mixed&$value

Definition at line 97 of file QuickTemplate.php.

References $name, $value, and data.

◆ setTranslator()

QuickTemplate::setTranslator ( $t)
Parameters
MediaWikiI18N&$t

Definition at line 104 of file QuickTemplate.php.

References $t.

◆ text()

QuickTemplate::text (   $str)
Access:\n private
Parameters
string$str

Definition at line 118 of file QuickTemplate.php.

References data.

Referenced by CologneBlueTemplate\sysLinks().

Member Data Documentation

◆ $config

Config QuickTemplate::$config
protected

Definition at line 40 of file QuickTemplate.php.

Referenced by __construct().

◆ $data

array QuickTemplate::$data

◆ $translator

MediaWikiI18N QuickTemplate::$translator

Definition at line 37 of file QuickTemplate.php.


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