Ejemplo n.º 1
0
 protected function findTemplate($path)
 {
     $path = $this->normalizeName($path);
     $this->parseName($path, $namespace, $tplPath);
     if ($namespace === 'root') {
         $fullFileName = sprintf('%s/%s', sfConfig::get('sf_app_template_dir'), $tplPath);
         $error = !is_file($fullFileName);
     } else {
         $fullFileName = $this->configuration->getTemplatePath($namespace, $tplPath);
         $error = $fullFileName === null;
     }
     if ($error) {
         throw new Twig_Error_Loader(sprintf('Unable to find template "%s" (full file name "%s")', $path, $fullFileName));
     }
     return $fullFileName;
 }