public function exists($name) { try { $this->findTemplate($name); } catch (Twig_Error_Loader $exception) { return false; } return true; }