Commit 521bf55f authored by Avris's avatar Avris

Separate request handling

parent 69b6dfb3
......@@ -6,5 +6,5 @@ Avris\Micrus\Twig\TwigEngine:
$dirs: '@Avris\Micrus\View\TemplateDirsResolver'
$cacheDir: '%CACHE_DIR%/twig'
Twig_Environment:
Twig\Environment:
resolve: '@Avris\Micrus\Twig\TwigEngine.twig'
<?php
namespace Avris\Micrus\Twig;
class Loader extends \Twig_Loader_Filesystem
use Twig\Loader\FilesystemLoader;
final class Loader extends FilesystemLoader
{
protected function findTemplate($name)
{
......
......@@ -25,7 +25,8 @@ final class TwigEngine implements EngineInterface, EventSubscriberInterface
bool $envAppDebug,
string $cacheDir,
array $twigExtensions
) {
)
{
$this->dirs = $dirs;
$this->twig = new Environment(
new Loader($dirs),
......
......@@ -4,7 +4,7 @@ namespace Avris\Micrus\Twig;
use Avris\Micrus\Bootstrap\ModuleInterface;
use Avris\Micrus\Bootstrap\ModuleTrait;
class TwigModule implements ModuleInterface
final class TwigModule implements ModuleInterface
{
use ModuleTrait;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment