Files
framework/Think/View/Driver/Think.php
thinkphp b2b4edaee0 测试
2013-03-13 14:15:52 +08:00

28 lines
1.1 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=array()){
$tpl = new Template($config);
$this->template = $tpl;
//$tpl->tpl_path = MODULE_PATH.'view/';
//$tpl->cache_path = MODULE_PATH.'cache/';
}
public function fetch($template,$data=array()){
$this->template->assign($data);
$this->template->display($template);
}
}