Example #1
0
 /**
  * 创建模板对象,预加载已编译模板
  * @param string $theme 指定主题名
  * @return Template
  */
 public function PrepareTemplate($theme = null)
 {
     if (is_null($theme)) {
         $theme =& $this->theme;
     }
     $template = new Template();
     $template->MakeTemplateTags();
     foreach ($GLOBALS['hooks']['Filter_Plugin_Zbp_MakeTemplatetags'] as $fpname => &$fpsignal) {
         $fpreturn = $fpname($template->templateTags);
     }
     $template->SetPath($this->usersdir . 'cache/compiled/' . $theme . '/');
     $template->theme = $theme;
     return $template;
 }