/**
* @return \Twig_Environment
*/
private function getTemplateEngine()
{
if (!$this->templateEngine instanceof \Twig_Environment) {
$this->templateEngine = new \Twig_Environment($this->getFilesystemLoader(), ['cache' => realpath(PATH_CACHE), 'auto_reload' => true]);
$this->templateEngine->addExtension(new \Twig_Extensions_Extension_I18n());
}
return $this->templateEngine;
}