I have been stuck on this one for a while. I cannot for the life of me figure out how to do this I am at the step where you would switch the renderer alias from Mustache_Engine to Twig. here is my code
/**
* Mustache Renderer
*/
/*$injector->alias('Todo\Template\Renderer', 'Todo\Template\MustacheRenderer');
$injector->define('Mustache_Engine', [
':options' => [
'loader' => new Mustache_Loader_FilesystemLoader(dirname(__DIR__) . '/templates', [
'extension' => '.html',
]),
],
]);*/
/**
* Twig Environment
*/
$injector->alias('Todo\Template\Renderer', 'Todo\Template\TwigRenderer');
$injector->delegate('Twig_Environment', function () use ($injector) {
$loader = new Twig_Loader_Filesystem(dirname(__DIR__) . '/templates');
return new Twig_Environment($loader);
});
I have been stuck on this one for a while. I cannot for the life of me figure out how to do this I am at the step where you would switch the renderer alias from Mustache_Engine to Twig. here is my code
But All I get is the following error