MediaWiki  1.28.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:

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)
 

Protected Attributes

 $config
 

Detailed Description

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

Definition at line 26 of file QuickTemplate.php.

Constructor & Destructor Documentation

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

Definition at line 34 of file QuickTemplate.php.

References $config, data, ConfigFactory\getDefaultInstance(), and wfDebug().

Member Function Documentation

QuickTemplate::execute ( )
abstract

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

Referenced by getHTML().

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 59 of file QuickTemplate.php.

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

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 74 of file QuickTemplate.php.

References $name, and data.

QuickTemplate::getHTML ( )

Fetch the output of a QuickTemplate and return it.

Since
1.23
Returns
string

Definition at line 182 of file QuickTemplate.php.

References $html, and execute().

QuickTemplate::getSkin ( )

Get the Skin object related to this object.

Returns
Skin

Definition at line 172 of file QuickTemplate.php.

References data.

Referenced by BaseTemplate\getMsg(), and BaseTemplate\printTrail().

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

Definition at line 152 of file QuickTemplate.php.

References data.

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

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

Definition at line 162 of file QuickTemplate.php.

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

Definition at line 115 of file QuickTemplate.php.

References data.

Referenced by SkinApiTemplate\execute(), SkinFallbackTemplate\execute(), and BaseTemplate\printTrail().

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

Definition at line 123 of file QuickTemplate.php.

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

Definition at line 131 of file QuickTemplate.php.

QuickTemplate::msgWiki (   $str)

An ugly, ugly hack.

Access:
private
Parameters
string$str

Definition at line 140 of file QuickTemplate.php.

References $wgOut, and global.

QuickTemplate::set (   $name,
  $value 
)

Sets the value $value to $name.

Parameters
string$name
mixed$value

Definition at line 49 of file QuickTemplate.php.

References $name, $value, and data.

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

Definition at line 86 of file QuickTemplate.php.

References $name, $value, and data.

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

Definition at line 93 of file QuickTemplate.php.

References $t.

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

Definition at line 107 of file QuickTemplate.php.

References data.

Member Data Documentation

QuickTemplate::$config
protected

Definition at line 29 of file QuickTemplate.php.

Referenced by __construct().


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