think\Controller::fetch PHP Method

fetch() protected method

加载模板输出
protected fetch ( string $template = '', array $vars = [], array $replace = [], array $config = [] ) : mixed
$template string 模板文件名
$vars array 模板输出变量
$replace array 模板替换
$config array 模板参数
return mixed
    protected function fetch($template = '', $vars = [], $replace = [], $config = [])
    {
        return $this->view->fetch($template, $vars, $replace, $config);
    }

Usage Example

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