traits\controller\View类增加engine方法用于初始化模板引擎

增加validate和auto额外扩展配置文件
This commit is contained in:
thinkphp
2016-02-20 11:11:53 +08:00
parent eae50abb78
commit 0521aebd1e
2 changed files with 14 additions and 1 deletions

View File

@@ -72,4 +72,17 @@ trait View
$this->initView();
$this->view->assign($name, $value);
}
/**
* 初始化模板引擎
* @access protected
* @param string $engine 引擎名称
* @param array $config 引擎参数
* @return void
*/
public function engine($engine, $config = [])
{
$this->initView();
$this->view->engine($engine, $config);
}
}