Extensible Template

Package:
Extensible Template
Summary:
Template engine extensible using sub-classes
Groups:
PHP 5, Templates
Author:
Daniel Marjos
Description:
This class implements a template processing engine.

It find and process tags in a template in the form of <tpl:TAG param1="value1" param2="value2" ...> block </tpl:TAG> or as in the contracted form <tpl:TAG param1="value1" param2="value2" ... />.

Each tag found is processed by calling functions of the class. Therefore, the template engin

Is extensible because you can extend the class, and by creating specificly formed methods in the descendant class, you can add new tags to the system. It will have a plug-in system as Smart has, but it'll take me some time.
Natively, the class has only 1 block tag and 4 simple tag defined.

The block tag is
<tpl:foreach control="variable_array" item="item_variable">
...
...
HTML BLOCK
..
...
</tpl:foreach>

where CONTROL is an array of associative array, where each value is a variable accesible by {item_variable.key}


Trackback URL for this post:

http://php-feeds.kalexandr.com/trackback/19443