theopera / twig-adapter
Installs: 78
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/theopera/twig-adapter
Requires
- theopera/framework: @alpha
- twig/twig: ^2.0
Requires (Dev)
- phpunit/phpunit: ^5.5
This package is auto-updated.
Last update: 2025-10-11 01:35:11 UTC
README
This adapter allows you to easily use the Twig template engine for rendering your views.
Installation
Run composer require theopera/twig-adapter
to get a copy of the adapter.
To make the adapter active, add the following code, to the MyContext
class.
public function getTemplateEngine() : RenderInterface { if($this->render === null){ $this->render = new TwigAdapter($this); } return $this->render; }
This will override the default PhpEngine template engine. Be sure to check your import statements.