This package integrates twig/twig in any container-interop compatible framework/container.
composer require phps-cans/universal-module.twig
Once installed, you need to register the PSCS\Universal\Module\TwigServiceProvider
into your container.
If your container supports Puli integration, you have nothing to do. Otherwise, refer to your framework or container's documentation to learn how to register service providers.
This service provider is meant to create a Symfony\Component\Console\Application.
This service provider provides the following services:
Service name | Description |
---|---|
ViewsDirectory |
The path to your views |
\Twig_Loader_Filesystem::class |
Twig Filsesystem loader |
Twig_Environment::class |
Twig environment using Filesystem loader |
Project template courtesy of thecodingmachine/service-provider-template