exts / twigulence
Twig Integration for the Opulence PHP 7.0 Framework
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/exts/twigulence
Requires
- php: ^7.0
- opulence/framework: ^1.0
- twig/twig: ^1.27
Requires (Dev)
- mockery/mockery: ^0.9
- phpunit/phpunit: 4.0.*
This package is auto-updated.
Last update: 2025-10-21 22:44:42 UTC
README
Twigulence is a bootstrapper for the Opulence PHP 7.0 Framework.
Installation
composer require exts/twigulence --no-dev- If you're running a fresh
Opulence/Projectthen I recommend heading into your/PROJECT_NAME/config/httpfolder and find thebootstrappers.phpfile - Remove the
ViewFunctionsBootstrapper::classandViewBootstrapper::classfrom this file and replace those with our Bootstrapper classTwigulence\Bootstrapper::class - To test add a twig file to your
resources/viewsfolder then in your controller call$this->viewFactory->createViewwith the file name excluding the file extension and you can use the setVars to set custom values to the view object and it'll pass that data to the twig template.
For now I hope this helps you get twig working with Opulence
TODO
- Working on the ability to make it easy to customize the bootstrapper, for now your best bet is to extend the Bootstrapper class and overwrite the
getTwigInstancemethod.