ceus-media / template-abstraction
0.4.0
2022-10-22 02:01 UTC
Requires
- php: ^7.4 | ^8
- blesta/h2o: dev-master
- ceus-media/common: ^0.9 | 0.9.x-dev
- ceus-media/template-engine: dev-master
- dwoo/dwoo: dev-master
- kriss0r/php-haml: dev-master
- latte/latte: v2.11.x-dev
- mustache/mustache: dev-main
- phptal/phptal: dev-master
- smarty/smarty: ^4.2
- twig/twig: 3.x-dev
Requires (Dev)
- php-parallel-lint/php-parallel-lint: ^1.3 | dev-master
- phpstan/phpstan: *
- phpstan/phpstan-strict-rules: *
- phpunit/phpunit: *
- rector/rector: *
Suggests
- blesta/h2o: dev-master
- dwoo/dwoo: ^1.3
- kriss0r/php-haml: dev-master
- latte/latte: ^2.10
- mustache/mustache: ^2.13
- phptal/phptal: 1.5.0
- smarty/smarty: ^3.1
- twig/twig: ^3.3
README
This library provides an abstraction layer for template engines.
Goals
Goals of this abstraction layer:
- to be able to replace the currently used template engine within your project
- to be able to use several template engines side by side within your project
- allow several developers of your project to use the template engine they like
- improve performance of your project by using different template engines for different tasks
- avoid/ignore template engine file extensions (like .pug or .haml)
- autodetect which template engine to use
To reach these goals, this library provides a clean interface to render templates using several available template engines in the background.
Template Engines
Currently supported template engines are:
- Twig Package Source Page
- Dwoo Package Source
- Smarty Package Source
- PHPTAL Package Source
- phpHaml Package Source Page
- Latte Package Source Page
- Mustache Package Source Page
- H2O Package Source
Upcoming versions will also support:
- Pug / Jade
Todos
Add Template Engines
Add phug
phug = pug-php = ex-jade
Add tale-pug
tale-pug = ex-tale-jade = ex-jade