twig = $twig; } /** * Render a twig template * * @param string $path * @param array $data * @return string * @throws LoaderError|RuntimeError|SyntaxError */ public function get($path, $data = []) { return $this->twig->render($path, $data); } /** * @param string $path * @return bool */ public function canRender($path) { return $this->twig->getLoader()->exists($path); } }