Recommend this page to a friend! |
All class groups | > | All authors | > | Classes of barnabás debreceni (1) | > | Mission progress status | > | Reputation |
|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| ||||
Template engine for PHP that allows to store your html code apart from your php code. It was tested with php 3.0.11. It features: - Simple variable interpolation ( {STUFF} ) - Array variable interpolation for eg. {ROW.ID} {ROW.NAME} {ROW.WHATEVER}, you assign an array to the variable ROW once - Global PHP variables available without making assigns for eg. {PHP.HTTP_HOST} {PHP.PHP_SELF} or any variable: {PHP.session_id} - Assign using arrays for eg. $xtpl->assign(array(STUFF=>"kewlstuff",ROW=>$row)); - Default nullstring for unassigned variables and unparsed blocks, custom nullstring for every variable or block - Dynamic blocks: - Multiple level dynamic blocks (nested blocks) - Autoreset feature (do not reset subblocks when reparsing parent block) - recursive parse to parse all subblocks of a block - File(template) include: {FILE "another.template.xtpl"}, the included templates can also contain includes recursively.. uses fopen so you can include http:// and ftp:// files too - Very simple and powerful syntax, you'll love it :) The code is very short and very optimized, according to my speed tests it's the fastest template engine around which can do nested blocks and variables.. The basic syntax is from FastTemplate and QuickTemplate (http://phpclasses.upperdesign.com/browse.html/package/49), but the entire class was written by me from scratch in one day, without a line from other template engines. THIS IS NOT A REWRITE OF OTHER ENGINES! The algorithm used makes this code amazing fast, you can do a bunch of nested dynamic blocks and everything you want, because it doesn't use recursive calls to build up the block tree. Contains 7 examples (which covers all features i think), I tried to write them so even newbies should understand easily. Docs and some functions i didn't need (clearing variables, etc) are still missing, but they'll come. Current version is 0.2.4. Licensed by LGPL. WARNING: these files are outdated, the latest versions available from the project homepage: http://xtpl.sourceforge.net/ |
Ratings | Utility | Consistency | Documentation | Examples | Tests | Videos | Overall | Rank |
All time: | 80% | 80% | - | - | - | - | 48% | 2991 |
Month: | Not yet rated by the users |
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |