Example #1
0
 /**
  * Returns true if the template is still fresh.
  *
  * @param string $name The template name
  * @param int    $time The last modification time of the cached template
  *
  * @return Boolean true if the template is fresh, false otherwise
  *
  * @throws Twig_Error_Loader When $name is not found
  */
 public function isFresh($name, $time)
 {
     $info = $this->cr->getInfo($this->getFile($name));
     return $info->getLastModified()->getTimestamp() > $time;
 }