inbep / templating-service-provider
This package is abandoned and no longer maintained.
The author suggests using the sergiors/templating-service-provider package instead.
Template engine implementation using PHP or Twig for Silex
2.0.1
2016-07-29 20:42 UTC
Requires
- php: >=5.5
- silex/silex: ^2
- symfony/templating: ~2.7|~3.0
Requires (Dev)
- pdepend/pdepend: ~2.0
- phing/phing: ~2.10
- phploc/phploc: ~2.1
- phpmd/phpmd: ~2.2
- phpunit/phpunit: ~4.8
- sebastian/phpcpd: ~2.0
- squizlabs/php_codesniffer: ~2.1
- symfony/twig-bridge: ~2.7|~3.0
- twig/twig: ~1.22
Suggests
- symfony/twig-bridge: For using the Twig
- twig/twig: For using the Twig
README
A service to help you with template engine implementation using PHP or Twig.
Install
composer require sergiors/templating-service-provider
use Sergiors\Silex\Provider\TemplatingServiceProvider; $app->register(new TemplatingServiceProvider(), [ 'templating.paths' => '__DIR__.'/../Resources/views/%name%' // or an array ]); $app['templating']->render(/.../);
If you want to use Twig:
use Silex\Provider\TwigServiceProvider; use Sergiors\Silex\Provider\TemplatingServiceProvider; $app->register(new TwigServiceProvider(), [ 'twig.path' => __DIR__.'/../Resources/views' ]); $app->register(new TemplatingServiceProvider()); $app['templating']->render(/.../);
Don't forget to install twig/twig
and symfony/twig-bridge
to use the Twig.
License
MIT