/**
  * {@inheritdoc}
  */
 public function getCacheKey($name)
 {
     try {
         return $this->findTemplate($name);
     } catch (\Exception $exception) {
         return $this->decoratedLoader->getCacheKey($name);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function getCacheKey($name)
 {
     $templates = $this->getTemplates($name);
     foreach ($templates as $template) {
         try {
             return $this->loader->getCacheKey($template);
         } catch (\Twig_Error $e) {
         }
     }
     throw new \RuntimeException(sprintf("Template \"%s\" not found. Tried the following:\n%s", $name, implode("\n", $templates)));
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function getCacheKey($name)
 {
     return $this->loader->getCacheKey($name);
 }