Vemplator v0.6.1

Started: 2005-11-06 Updated: 2008-01-09
Progress: 98%
Language: PHP5
OS: Web
License: MIT

Browse the Latest Code

Vemplator is PHP template engine that strives to be light-weight yet featured, and does quite well in only 200 lines of code. The template syntax is concise, and the code is written to be extensible.

It also aims to make MVC (Model/Vemplator/Controller) a reality. :-)

What is a Template Engine?

Template Engines are sometimes referred to as a Templator, Template Parser or Templating System. See my Website Templating Systems article.

Examples

Example Source
Template File

Template Syntax and Features

(See the README to the right for more details)

Details

Notes

Documentation is incomplete, as it is lacking detailed usage information. However, included with the source is a sample file which should be of assistance.

Also, the folder that holds cached templates must be writable by your HTTP server.

 

Files

09 January 2008

Fix shortcomings with regular expressions that perform template compilation; they're now more concise and should match all possible combinations of array and object references, nested and otherwise.

See the CHANGES for more info.

vemplator-0.6.1.tar.gz
vemplator-0.6.1.zip

README

30 July 2007

Added support for method and function calls! Now users have no excuses against trying vemplator. :-) I came across a situation where having function calls made sense, so I had a change of heart. However, one still cannot modify variables from within the template. This also means I've done away with output modifiers, which were my previous "workaround" for not allowing function calls. I'm now striving to be a pragmatist!

Greatly cleaned up compilation logic. There's no longer a need for preg_replace_callback() which reduces complexity. The should also result in simpler and hopefully faster code.

Updated the example to highlight the new changes.

See the CHANGES for more info.

vemplator-0.6.tar.gz
vemplator-0.6.zip

README

28 May 2007

Now uses PHP's include path to find templates, which should be simpler than having to call a vemplator method to set the template path. I also added Output Modifiers which facilitate making simple function calls. For instance, you could add a modifer that will format decimal variables to the correct format for the current locale.

vemplator-0.5.tar.gz

vemplator-0.5.zip


 

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.