Пример #1
0
 /**
  * {@inheritdoc}
  *
  * @throws Mustache_Exception_UnknownTemplateException If the template is not found
  */
 public function findView($name)
 {
     if (substr($name, -9) !== '.mustache') {
         $name .= '.mustache';
     }
     if (!($file = parent::findView($name))) {
         throw new Mustache_Exception_UnknownTemplateException('Could not locate: ' . $name);
     }
     return $file;
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function findView($name)
 {
     if (substr($name, -11) !== '.handlebars' && substr($name, -4) !== '.hbs') {
         $name = $this->prefix . $name . '.handlebars';
     }
     if (!($file = parent::findView($name))) {
         throw new ViewNotFoundException('Could not locate: ' . $name);
     }
     return $file;
 }
Пример #3
0
 /**
  * {@inheritdoc}
  *
  * @throws Twig_Error_Loader If the view is not found
  */
 public function findView($name)
 {
     if (substr($name, -5) !== '.twig') {
         $name .= '.twig';
     }
     if (!($file = parent::findView($name))) {
         throw new Twig_Error_Loader('Could not locate: ' . $name);
     }
     return $file;
 }