Class template

Description

Generic Template processing class.

Loads template files recursively and then replaces any replace tags

Located in Program_Root/template.inc (line 103)


	
			
Direct descendents
Class Description
dbForm dbForm - Create, validate and process HTML forms based on Database Tables
Method Summary
class template (string $templateFile)
void display ()
string processTemplate ()
void replace (string $tag, [string $value = null])
void setTemplateFile (string $templateFile)
Methods
Constructor template (line 141)

Class constructor

  • access: public
class template (string $templateFile)
  • string $templateFile: templateFile The Template file to be loaded
display (line 229)

Display the template

Calls processTemplate and echos the result

  • access: public
void display ()
processTemplate (line 206)

Process the Template

Replaces any set replace tags in the template and returns the result

  • access: public
string processTemplate ()

Redefined in descendants as:
replace (line 163)

Function to set the replace values

No tags are replaced until the template is processed. In the mean time this information is stored in the _replace property.

  • throws: E_USER_ERROR on validation errors
  • access: public
void replace (string $tag, [string $value = null])
  • string $tag: tag The name of the tag to replace
  • string $value: value The data to replace the tag
setTemplateFile (line 184)

Function to set the templateFile

Sets the template file and pre-parses the template loading any sub-templates

  • throws: E_USER_ERROR on validation errors
  • access: public
void setTemplateFile (string $templateFile)
  • string $templateFile: templateFile The full path and filename of the file to be loaded

Documention generated on Sun, 14 Sep 2003 18:35:16 +1000 by phpDocumentor 1.2.1