Grammar Template: Template engine in PHP and other languages

Recommend this page to a friend!
  Info   View files Example   Screenshots Screenshots   View files View files (40)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2020-09-15 (2 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 142 This week: 3All time: 8,960 This week: 68Up
Version License PHP version Categories
grammartemplate 1.0Artistic License5PHP 5, Templates, Parsers
Description Author

This package implements a template engine that can work in PHP and in other languages.

It can parse a given template string that can be processed by the engine to expand to the processed output.

The engine can take parameters that define regular variables or array of variables to replace in the template placeholders, optional blocks, and nested blocks.

The package provides an implementation of the same template engine in PHP, Python and JavaScript that can work with regular browser side JavaScript code, or Node.js or XPCOM Javascript.

Innovation Award
PHP Programming Innovation award nominee
September 2020
Number 6
Template engines are very useful to separate programming logic from presentation logic.

Some applications may need to generate the same presentation from templates either on the server side with a language like PHP, or with on the browser side language like JavaScript.

The package implements a template engine that works in multiple languages including PHP and JavaScript.

This way developers can use this package PHP and JavaScript versions to render the same site presentation using the same template files.

Manuel Lemos
Picture of Nikos M.
Name: Nikos M. is available for providing paid consulting. Contact Nikos M. .
Classes: 13 packages by
Country: Greece Greece
Age: 44
All time rank: 108610 in Greece Greece
Week rank: 11 Up1 in Greece Greece Up
Innovation award
Innovation award
Nominee: 5x

 

Screenshots  
  • grammartemplate-editor.png
  Files folder image Files  
File Role Description
Files folder imagesrc (6 directories)
Files folder imagetest (30 files)
Accessible without login Image file grammartemplate.jpg Data Documentation ima
Accessible without login Plain text file README.md Example Example script

  Files folder image Files  /  src  
File Role Description
Files folder imageactionscript (1 file)
Files folder imagec (1 file)
Files folder imagejava (1 file)
Files folder imagejs (2 files)
Files folder imagephp (1 file)
Files folder imagepython (2 files)

  Files folder image Files  /  src  /  actionscript  
File Role Description
  Accessible without login Plain text file todo.txt Doc. Documentation

  Files folder image Files  /  src  /  c  
File Role Description
  Accessible without login Plain text file todo.txt Doc. Documentation

  Files folder image Files  /  src  /  java  
File Role Description
  Accessible without login Plain text file todo.txt Doc. Documentation

  Files folder image Files  /  src  /  js  
File Role Description
  Accessible without login Plain text file GrammarTemplate.js Data Auxiliary data
  Accessible without login Plain text file GrammarTemplate.min.js Data Auxiliary data

  Files folder image Files  /  src  /  php  
File Role Description
  Plain text file GrammarTemplate.php Class Class source

  Files folder image Files  /  src  /  python  
File Role Description
  Accessible without login Plain text file GrammarTemplate.py Data Auxiliary data
  Accessible without login Plain text file __init__.py Data Auxiliary data

  Files folder image Files  /  test  
File Role Description
  Accessible without login Plain text file out-align-js Data Auxiliary data
  Accessible without login Plain text file out-align-php Data Auxiliary data
  Accessible without login Plain text file out-align-py Data Auxiliary data
  Accessible without login Plain text file out-delims-js Data Auxiliary data
  Accessible without login Plain text file out-delims-php Data Auxiliary data
  Accessible without login Plain text file out-delims-py Data Auxiliary data
  Accessible without login Plain text file out-expr-js Data Auxiliary data
  Accessible without login Plain text file out-expr-php Data Auxiliary data
  Accessible without login Plain text file out-expr-py Data Auxiliary data
  Accessible without login Plain text file out-js Data Auxiliary data
  Accessible without login Plain text file out-php Data Auxiliary data
  Accessible without login Plain text file out-postop-js Data Auxiliary data
  Accessible without login Plain text file out-postop-php Data Auxiliary data
  Accessible without login Plain text file out-postop-py Data Auxiliary data
  Accessible without login Plain text file out-py Data Auxiliary data
  Accessible without login Plain text file test-alignment.js Data Auxiliary data
  Accessible without login Plain text file test-alignment.php Example Example script
  Accessible without login Plain text file test-alignment.py Data Auxiliary data
  Accessible without login Plain text file test-delims.js Data Auxiliary data
  Accessible without login Plain text file test-delims.php Example Example script
  Accessible without login Plain text file test-delims.py Data Auxiliary data
  Accessible without login Plain text file test-postop-recursion.js Data Auxiliary data
  Accessible without login Plain text file test-postop-recursion.php Example Example script
  Accessible without login Plain text file test-postop-recursion.py Data Auxiliary data
  Accessible without login Plain text file test-recursion.js Data Auxiliary data
  Accessible without login Plain text file test-recursion.php Example Example script
  Accessible without login Plain text file test-recursion.py Data Auxiliary data
  Accessible without login Plain text file test.js Data Auxiliary data
  Accessible without login Plain text file test.php Example Example script
  Accessible without login Plain text file test.py Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:142
This week:3
All time:8,960
This week:68Up

For more information send a message to info at phpclasses dot org.