Files
framework/library/think/view/driver/think.php
thinkphp d28e27270c 类库别名和调用修正
增加sae日志驱动
改进Hook类的exec方法
行为扩展优先检测标签方法 不存在则调用run方法
NOW_TIME改用REQUEST_TIME_FLOAT
变量命名规范
2015-02-24 10:45:34 +08:00

29 lines
1.0 KiB
PHP

<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think\view\driver;
use think\Template;
class Think {
private $template = null;
public function __construct($config=[]){
$this->template = new Template($config);
}
public function fetch($template,$data=[],$cacheId=''){
if(is_file($template)) {
$this->template->display($template,$data,$cacheId);
}else{
$this->template->fetch($template,$data);
}
}
}