/**
  * {@inheritdoc}
  */
 public function isFresh($name, $time)
 {
     try {
         return filemtime($this->findTemplate($name)) <= $time;
     } catch (\Exception $exception) {
         return $this->decoratedLoader->isFresh($name, $time);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function isFresh($name, $time)
 {
     $templates = $this->getTemplates($name);
     foreach ($templates as $template) {
         try {
             return $this->loader->isFresh($template, $time);
         } 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 isFresh($name, $time)
 {
     return $this->loader->isFresh($name, $time);
 }