ZBlogPHP::PrepareTemplate PHP Method

PrepareTemplate() public method

创建模板对象,预加载已编译模板
public PrepareTemplate ( string $theme = null ) : Template
$theme string 指定主题名
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;
    }
ZBlogPHP