Returns true if the template is still fresh.
string $name The template name:
timestamp $time The last modification time of the cached template:
Boolean true if the template is fresh, false otherwise
Twig_Error_Loader When $name is not found
Overrides Twig_LoaderInterface::isFresh
public function isFresh($name, $time) {
$exceptions = array();
foreach ($this->loaders as $loader) {
if ($loader instanceof Twig_ExistsLoaderInterface && !$loader
->exists($name)) {
continue;
}
try {
return $loader
->isFresh($name, $time);
} catch (Twig_Error_Loader $e) {
$exceptions[] = get_class($loader) . ': ' . $e
->getMessage();
}
}
throw new Twig_Error_Loader(sprintf('Template "%s" is not defined (%s).', $name, implode(' ', $exceptions)));
}