Template.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. namespace think\facade;
  12. use think\Facade;
  13. /**
  14. * @see \think\Template
  15. * @mixin \think\Template
  16. * @method void assign(mixed $name, mixed $value = '') static 模板变量赋值
  17. * @method mixed get(string $name = '') static 获取模板变量
  18. * @method void fetch(string $template, array $vars = [], array $config = []) static 渲染模板文件
  19. * @method void display(string $content, array $vars = [], array $config = []) static 渲染模板内容
  20. * @method mixed layout(string $name, string $replace = '') static 设置模板布局
  21. */
  22. class Template extends Facade
  23. {
  24. /**
  25. * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
  26. * @access protected
  27. * @return string
  28. */
  29. protected static function getFacadeClass()
  30. {
  31. return 'template';
  32. }
  33. }