Vemplator 0.6.1

Vemplator

Vemplator is PHP template engine basically replaces specially formatted strings of text(variables, etc.) contained in an HTML file, it is fully exploiting this results in code without any any interspersed (and hard to find) HTML tags. When implemented properly, a site's layout can be changed merely through HTML files without having to modify any code.

This PHP Template aims 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 strives to make MVC a reality.

Design Goals of this PHP Template Enging:
- Create a simple template syntax that is easy to parse (and keep it that way)
- The algorithm for parsing the simple syntax should be succinct and comprehendable, not spread out over several files
- If the parsing algorithm is easily understood then it should be easy to extend the simple syntax

Features of Vemplator:
- Ability to make function calls from within templates
- Template variables
- Conditionals: if/else
- Conditionals: switch statements (case values can be string constants or other variables)
- Dot-notation for class member variables (customer.name)
- Numerically indexed arrays: record[1][3]
- Associative arrays: customer['name']
- Array elements indexed by other template variables: customer[ key ]
- Foreach looping
- Caching of parsed templates
- Template includes (included templates are parsed and cached separately)
- Less bloat than alternatives

License type: MIT
Date added: 3 years, 7 months 23 days ago | Last updated: 3 years, 7 months 18 days ago

More popular Template engine

Listing Files

  • notes
  • 343 Bytes
  • 01/09/2008 20:50:34
  • CHANGES
  • 2.4 KB
  • 01/09/2008 20:50:18
  • FUTURE
  • 421 Bytes
  • 01/09/2008 20:51:40
example
cache
  • README
  • 3.5 KB
  • 01/09/2008 20:50:18
  • LICENSE
  • 1.0 KB
  • 01/09/2008 20:51:32