mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-03 05:52:48 +08:00
TP4初始版本提交
This commit is contained in:
28
Library/Think/View/Driver/Think.php
Normal file
28
Library/Think/View/Driver/Think.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user