$_ENV['APP_ENV'] === 'development', ]); self::$twig->addExtension(new DebugExtension()); // self::$twig->addExtension(new IntlExtension()); self::$twig->addFilter(new TwigFilter('buildTime', function ($buildTime) { return @sprintf('%02d:%02d:%02d', $buildTime / 3600, ($buildTime / 60) % 60, $buildTime % 60); })); self::$twig->addGlobal('session', $_SESSION); } /** * @param string $name * @param array $context */ public static function render(string $name, array $context = []): string { return self::$twig->render($name, $context); } }