Here’s a simple, light-weight, innovative and fast templating engine for PHP, client-side JavaScript and Node.js. It is fully working and extensible, and like other templating engines out there, it is multipurpose and elegant. This Repository does a minimum amount of caching and parsing to build dynamic templates that can be used in both PHP and JavaScript.
The complete source code and necessary project files of the proposed Templating Engine can be downloaded from the link below. A project report is not available for this one, so you can refer the description provided here and use it to create a synopsis of the project.
Download Simple Templating Engine using PHP with Source Code
PHP Templating Engine – Project Abstract:
This templating engine is very versatile, but you may encounter a few performance issues sometimes as it is built with minimum features. So, PHP, itself being a templating language, was used for the development. The result is a very fast, simple, and multipurpose templating engine.
The repository does minimum parsing and caching to develop dynamic templates and tries to contain the much needed functionality inside the common language subset. It can cache templates both in PHP and JavaScript dynamically. File system caching has 3 modes:
- NONE: uses only in-memory caching,
- NOUPDATE: caches the templates only once, and
- AUTOUPDATE: re-creates the cached template if original template has changed.
Features:
- simple
- light-weight
- innovative
- multipurpose
- elegant
- easily extensible and configurable
Classes:
This templating engine uses just 2 classes — one for PHP and one for JavaScript: Contemplate.php and Contemplate.js respectively. No other dependencies!