コード例 #1
0
ファイル: class.base.php プロジェクト: deanet/Neon
 public function DoRenderTemplate($template, $strings)
 {
     /* DEPRECATED: Please do not use this function.
      * Class-specific templater functions have been discontinued. Instead, you can use
      * Templater::AdvancedParse for rendering templates without instantiating a Templater
      * yourself. */
     global $locale;
     try {
         $tpl = new Templater();
         $tpl->Load($template);
         $tpl->Localize($locale->strings);
         $tpl->Compile($strings);
         return $tpl->Render();
     } catch (Exception $e) {
         $classname = get_class($this);
         throw new Exception("Failed to render template {$classname}.{$template}.");
     }
 }