Files
framework/Think/View/Driver/Think.php
thinkphp 15a45e9ff7 Session驱动的扩展定义方式改变 采用SessionHandler机制
Model类的架构方法 参数调整
2013-04-09 21:29:32 +08:00

27 lines
1.0 KiB
PHP

<?php
// +----------------------------------------------------------------------
// | TOPThink [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2011 http://topthink.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$
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);
}
}
}