mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-03 14:02:47 +08:00
模板引擎类的display和fetch方法改进
This commit is contained in:
@@ -13,16 +13,12 @@ namespace Think\View\Driver;
|
||||
use Think\Template;
|
||||
class Think {
|
||||
private $template = null;
|
||||
public function __construct($config=array()){
|
||||
$tpl = new Template($config);
|
||||
$this->template = $tpl;
|
||||
//$tpl->tpl_path = MODULE_PATH.'view/';
|
||||
//$tpl->cache_path = MODULE_PATH.'cache/';
|
||||
public function __construct($config=[]){
|
||||
$this->template = new Template($config);
|
||||
}
|
||||
|
||||
public function fetch($template,$data=array()){
|
||||
$this->template->assign($data);
|
||||
$this->template->display($template);
|
||||
public function fetch($template,$data=[]){
|
||||
$this->template->display($template,$data);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user