Mobile.class.php 1.0 KB

12345678910111213141516171819202122232425262728
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006-2014 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. namespace Think\Template\Driver;
  12. /**
  13. * MobileTemplate模板引擎驱动
  14. */
  15. class Mobile {
  16. /**
  17. * 渲染模板输出
  18. * @access public
  19. * @param string $templateFile 模板文件名
  20. * @param array $var 模板变量
  21. * @return void
  22. */
  23. public function fetch($templateFile,$var) {
  24. $templateFile=substr($templateFile,strlen(THEME_PATH));
  25. $var['_think_template_path']=$templateFile;
  26. exit(json_encode($var));
  27. }
  28. }