More tests and refactoring
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2023-06-15 14:10:17 +00:00
parent 72058335ca
commit f41571cfd2
9 changed files with 92 additions and 38 deletions

20
src/Template/Twig.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
namespace App\Template;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
use App\Template\TwigExtension;
class Twig extends Environment
{
/**
* @param string[] $templates Array of templates
*/
public function __construct(array $templates)
{
$loader = new ArrayLoader($templates);
parent::__construct($loader);
$this->addExtension(new TwigExtension());
}
}