Inheritance diagram for TemplateEngine:Public Member Functions | |
| display ($template) | |
| template_exists ($template) | |
| fetch ($template) | |
| __get ($key) | |
| __set ($key, $value) | |
| __unset ($key) | |
| __isset ($key) | |
| assign ($key, $value= '') | |
| assigned ($key) | |
| clear () | |
| append ($key, $value= '') | |
| set_template_dir ($dir) | |
Protected Attributes | |
| $template_dir = null | |
Habari TemplateEngine abstract base class
The TemplateEngine is an abstract base class to allow any template engine to supply templates for the UI. For an example implementation, see RawPHPEngine or SmartyEngine
Definition at line 16 of file templateengine.php.
| TemplateEngine::__get | ( | $ | key | ) | [abstract] |
Tries to retrieve a variable from the internal array engine_vars. Method returns the value if succesful, returns false otherwise.
| key | name of variable |
Reimplemented in RawPHPEngine.
| TemplateEngine::__isset | ( | $ | key | ) | [abstract] |
Detects if a variable is assigned to the template engine for use in constructing the template's output.
| key | name of variable |
Reimplemented in RawPHPEngine.
| TemplateEngine::__set | ( | $ | key, | |
| $ | value | |||
| ) | [abstract] |
Assigns a variable to the template engine for use in constructing the template's output.
| key | name of variable | |
| value | value of variable |
Reimplemented in RawPHPEngine.
| TemplateEngine::__unset | ( | $ | key | ) | [abstract] |
Unassigns a variable to the template engine.
| key | name of variable |
Reimplemented in RawPHPEngine.
| TemplateEngine::append | ( | $ | key, | |
| $ | value = '' | |||
| ) | [abstract] |
Appends to an existing variable more values
| key | name of variable | |
| value | value of variable |
Reimplemented in RawPHPEngine.
| TemplateEngine::assign | ( | $ | key, | |
| $ | value = '' | |||
| ) | [abstract] |
Assigns a variable to the template engine for use in constructing the template's output.
| key | name of variable | |
| value | value of variable |
Reimplemented in RawPHPEngine.
| TemplateEngine::assigned | ( | $ | key | ) | [abstract] |
Detects if a variable is assigned to the template engine for use in constructing the template's output.
| string | $key name of variable |
Reimplemented in RawPHPEngine.
| TemplateEngine::clear | ( | ) | [abstract] |
Clear all of the assigned values
Reimplemented in RawPHPEngine.
| TemplateEngine::display | ( | $ | template | ) | [abstract] |
A function which outputs the result of a transposed template to the output stream
| template | Name of template to display |
Reimplemented in HiEngine, and RawPHPEngine.
| TemplateEngine::fetch | ( | $ | template | ) | [abstract] |
A function which returns the content of the transposed template as a string
| template | Name of template to fetch |
Reimplemented in RawPHPEngine.
| TemplateEngine::set_template_dir | ( | $ | dir | ) |
Sets the directory for the engine to find templates
| mixed | Directory path as string or array. Earlier elements override later elements. |
Definition at line 117 of file templateengine.php.
| TemplateEngine::template_exists | ( | $ | template | ) | [abstract] |
Returns the existance of the specified template name
| template | $template Name of template to detect |
Reimplemented in RawPHPEngine.
1.7.1