Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JTemplate

Description

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

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

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 62)

Class constructor

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

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

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 120)

Execute and display a the template

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

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 131)

Returns a parsed template

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

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 108)

Parse a file

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

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 Mon, 05 Mar 2007 21:29:02 +0000 by phpDocumentor 1.3.1