Table of Contents
Note: If you think that this is like FastTemplates, read carefully. It isn't.
The template class allows you to keep your HTML code in some external files which are completely free of PHP code, but contain replacement fields. The class provides you with functions which can fill in the replacement fields with arbitrary strings. These strings can become very large, e.g. entire tables.
NOTE: This version of the documentation is no longer maintained. Please see the phpdoc comments in the template.inc source file for the definitive documentation.
Accessible instance variables
| classname | String. Serialization helper: The name of this class. |
| debug | Integer, Bitmask: set 1 bit to see all variable assignments,set 2 bit to see all variable accesses,set 4 bit to see internal function references. |
| unknowns | One of "keep", "comment", "remove" (Default).Determines how to handle unresolved variable names intemplates upon output. If set to "keep", those are leftuntouched. If set to "comment", unresolved variable names aretransformed into HTML comments reporting the error. If set to"remove", unresolved variable names are silently removed (thedefault). |
| halt_on_error = "yes" | One of "yes"(Default), "report", "no". Determines how Template handleserror conditions. If set to "yes" (the Default), the error isreported, then execution is halted. If set to "report", theerror is reported, then execution continues by returning"false". If set to "no", errors are silently ignored, andexecution resumes reporting "false". |
| last_error = "" | The last error message iskept in this variable. |
Internal instance variables
| file | Hash of strings. A translation table whichtranslates variable names into filenames. |
| root | String (Pathname). The base directory from whichtemplate files are being loaded. |
| varkeys | Hash of strings. A translation table whichtranslates variable names into regular expressions forthemselves. |
| varvals | Hash of strings. A translation table whichtranslates variable names into replacement values for theirrespective varkeys. |