Skip to content

Commit 0081e8d

Browse files
committed
增加移动客户端模板引擎
1 parent d5cffdc commit 0081e8d

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
// +----------------------------------------------------------------------
3+
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4+
// +----------------------------------------------------------------------
5+
// | Copyright (c) 2006-2013 http://thinkphp.cn All rights reserved.
6+
// +----------------------------------------------------------------------
7+
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
8+
// +----------------------------------------------------------------------
9+
// | Author: luofei614<weibo.com/luofei614>
10+
// +----------------------------------------------------------------------
11+
12+
defined('THINK_PATH') or exit();
13+
/**
14+
* MobileTemplate模板引擎驱动
15+
* @category Extend
16+
* @package Extend
17+
* @subpackage Driver.Template
18+
* @author luofei614 <weibo.com/luofei614>
19+
*/
20+
class TemplateMobile {
21+
/**
22+
* 渲染模板输出
23+
* @access public
24+
* @param string $templateFile 模板文件名
25+
* @param array $var 模板变量
26+
* @return void
27+
*/
28+
public function fetch($templateFile,$var) {
29+
$templateFile=substr($templateFile,strlen(THEME_PATH));
30+
$var['_think_template_path']=$templateFile;
31+
exit(json_encode($var));
32+
}
33+
}

0 commit comments

Comments
 (0)