Template class.
The interface was originally inspired by PHPLib templates, and the template file formats are quite similar.
Located in /Core/Template.php (line 12)
| Class | Description |
|---|---|
| TestTemplate | Template class. |
Constructor. Simply sets the root dir.
Block-level variable assignment. Adds a new block iteration with the given variable assignments. Note that this should only be called once per block iteration.
Root-level variable assignment. Adds to current assignments, overriding any existing variable assignment with the same name.
Root-level variable assignment. Adds to current assignments, overriding any existing variable assignment with the same name.
Compiles the given string of code, and returns the result in a string.
If "doNotEcho" is true, the returned code will not be directly executable, but can be used as part of a variable assignment for use in assignCodeFromHandle().
Destroys this template object. Should be called when you're done with it, in order to clear out the template data so you can load/parse a new template set.
Generates a reference to the array of data values for the given (possibly nested) block namespace. This is a string of the form: $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN']
NOTE: does not expect a trailing "." on the blockname.
Generates a reference to the given variable inside the given (possibly nested) block namespace. This is a string of the form: ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . ' It's ready to be inserted into an "echo" line in one of the templates.
NOTE: expects a trailing "." on the namespace.
Returns compiled code for the given handle.
Returns uncompiled code for the given handle.
If not already done, load the file for the given handle and populate the uncompiled_code[] hash with its code. Do not compile.
Generates a full path+filename for the given filename, which can either be an absolute name, or a name relative to the rootdir for this Template object.
Sets the template filenames for handles. $filenameArray should be a hash of handle => filename pairs.
Sets the template root directory for this Template object.
Documentation generated on Mon, 11 Dec 2006 22:42:38 +0300 by phpDocumentor 1.3.0