Action::fetch PHP Method

fetch() protected method

获取输出页面内容 调用内置的模板引擎fetch方法
protected fetch ( string $templateFile = '', string $charset = 'utf-8', string $contentType = 'text/html' ) : strin
$templateFile string 指定要调用的模板文件 默认为空 由系统自动定位模板文件
$charset string 输出编码
$contentType string 输出类
return strin
    protected function fetch($templateFile = '', $charset = 'utf-8', $contentType = 'text/html')
    {
        $GLOBALS['time_run_detail']['action_display_before_fetch'] = microtime(true);
        $this->assign('appCssList', $this->appCssList);
        $this->assign('appJsList', $this->appJsList);
        $this->assign('langJsList', $this->langJsList);
        Addons::hook('core_display_tpl', array('tpl' => $templateFile, 'vars' => $this->tVar, 'charset' => $charset, 'contentType' => $contentType, 'display' => $display));
        $content = fetch($templateFile, $this->tVar, $charset, $contentType);
        $this->buildHtml($content);
        return $content;
    }

Usage Example

コード例 #1
0
 function fetch($templateFile = '', $content = '', $prefix = '')
 {
     return parent::fetch($this->parseTemplate($templateFile), $content, $prefix);
 }