ceus-media / template-abstraction
0.6.0
2025-02-11 12:59 UTC
Requires
- php: ^8.3
- ceus-media/common: 1.1.* | 1.1.x-dev
- ceus-media/template-engine: 0.6.* | 0.6.x-dev
Requires (Dev)
- blesta/h2o: dev-master
- dwoo/dwoo: ^1.3
- kriss0r/php-haml: dev-master
- latte/latte: ^3.0
- mustache/mustache: ^2.13
- php-parallel-lint/php-parallel-lint: 1.*
- phpstan/phpstan: 1.*
- phpstan/phpstan-strict-rules: 1.*
- phptal/phptal: 1.5.0
- phpunit/phpunit: 10.*
- rector/rector: 1.*
- smarty/smarty: ^4.2
- twig/twig: ^3.3
Suggests
- blesta/h2o: dev-master
- dwoo/dwoo: ^1.3
- kriss0r/php-haml: dev-master
- latte/latte: ^3.0
- mustache/mustache: ^2.13
- phptal/phptal: 1.5.0
- smarty/smarty: ^4.2
- 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