View.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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\View
  15. * @mixin \think\View
  16. * @method \think\View init(mixed $engine = [], array $replace = []) static 初始化
  17. * @method \think\View share(mixed $name, mixed $value = '') static 模板变量静态赋值
  18. * @method \think\View assign(mixed $name, mixed $value = '') static 模板变量赋值
  19. * @method \think\View config(mixed $name, mixed $value = '') static 配置模板引擎
  20. * @method \think\View exists(mixed $name) static 检查模板是否存在
  21. * @method \think\View filter(Callable $filter) static 视图内容过滤
  22. * @method \think\View engine(mixed $engine = []) static 设置当前模板解析的引擎
  23. * @method string fetch(string $template = '', array $vars = [], array $config = [], bool $renderContent = false) static 解析和获取模板内容
  24. * @method string display(string $content = '', array $vars = [], array $config = []) static 渲染内容输出
  25. */
  26. class View extends Facade
  27. {
  28. /**
  29. * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
  30. * @access protected
  31. * @return string
  32. */
  33. protected static function getFacadeClass()
  34. {
  35. return 'view';
  36. }
  37. }