Support Joomla!

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 Class JTemplate

Description

Template class, provides an easy interface to parse and display a template file

Located in /joomla/template/template.php (line 29)

Class patTemplate   (Package patTemplate)

Class JTemplate   (Subpackage Template)
Method Summary
Constructor JTemplate __construct ()
Constructor Object JTemplate ()
Method void display (string $name)
Method boolean enableTemplateCache (string $handler, string $folder)
Method void fetch (string $name)
Method jtemplate &getInstance ([string $type = 'html'])
Method void parse (string $file)
Method boolean setTemplateCachePrefix (string $prefix)
Variables

Inherited Variables

Inherited from patTemplate

Variable patTemplate::$_systemVars
Methods
Constructor __construct (line 61)

Class constructor

The type influences the tags you are using in your templates.

  • access: protected
JTemplate __construct ()
Constructor JTemplate (line 48)

A hack to support __construct() on PHP 4

Hint: descendant classes have no PHP4 class_name() constructors, so this constructor gets called first and calls the top-layer __construct() which (if present) should call parent::__construct()

Object JTemplate ()
display (line 119)

Execute and display a the template

  • access: public
void display (string $name)
  • string $name: The name of the template
enableTemplateCache (line 155)

enable a template cache

A template cache will improve performace, as the templates do not have to be read on each request.

  • return: true on success, patError otherwise
  • access: public
boolean enableTemplateCache (string $handler, string $folder)
  • string $handler: name of the template cache
  • string $folder: folder to store the cached files
fetch (line 130)

Returns a parsed template

  • access: public
void fetch (string $name)
  • string $name: The name of the template
getInstance (line 84)

Returns a reference to a global Template object, only creating it if it doesn't already exist.

  • return: A template object
  • since: 1.5
jtemplate &getInstance ([string $type = 'html'])
  • string $type: (either html or tex)
parse (line 107)

Parse a file

  • access: public
void parse (string $file)
  • string $file: The filename
setTemplateCachePrefix (line 175)

Set the prefix of the template cache

  • return: true on success, patError otherwise
  • access: public
boolean setTemplateCachePrefix (string $prefix)
  • string $prefix: the prefix of the template cache

Inherited Methods

Inherited From patTemplate

 patTemplate::patTemplate()
 patTemplate::addGlobalVar()
 patTemplate::addGlobalVars()
 patTemplate::addModuleDir()
 patTemplate::addObject()
 patTemplate::addRows()
 patTemplate::addVar()
 patTemplate::addVars()
 patTemplate::applyInputFilter()
 patTemplate::applyInputFilters()
 patTemplate::applyOutputFilter()
 patTemplate::clearAllTemplates()
 patTemplate::clearAttribute()
 patTemplate::clearGlobalVar()
 patTemplate::clearGlobalVars()
 patTemplate::clearTemplate()
 patTemplate::clearVar()
 patTemplate::clearVars()
 patTemplate::displayParsedTemplate()
 patTemplate::dump()
 patTemplate::exists()
 patTemplate::freeAllTemplates()
 patTemplate::freeTemplate()
 patTemplate::getAttribute()
 patTemplate::getAttributes()
 patTemplate::getDefaultAttributes()
 patTemplate::getEndTag()
 patTemplate::getGlobalVars()
 patTemplate::getIncludePath()
 patTemplate::getNamespace()
 patTemplate::getOption()
 patTemplate::getParsedTemplate()
 patTemplate::getRoot()
 patTemplate::getStartTag()
 patTemplate::getVar()
 patTemplate::loadModule()
 patTemplate::loadTemplate()
 patTemplate::loadTemplateFromInput()
 patTemplate::moduleExists()
 patTemplate::parseIntoVar()
 patTemplate::parseTemplate()
 patTemplate::placeholderExists()
 patTemplate::prepareTemplate()
 patTemplate::readTemplatesFromFile()
 patTemplate::readTemplatesFromInput()
 patTemplate::setAttribute()
 patTemplate::setAttributes()
 patTemplate::setBasedir()
 patTemplate::setDefaultAttribute()
 patTemplate::setDefaultAttributes()
 patTemplate::setNamespace()
 patTemplate::setOption()
 patTemplate::setRoot()
 patTemplate::setTags()
 patTemplate::setType()
 patTemplate::useTemplateCache()

Documentation generated on Sat, 14 Nov 2009 11:21:46 +0000 by phpDocumentor 1.3.1