No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Response.php 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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\Response
  15. * @mixin \think\Response
  16. * @method \think\response create(mixed $data = '', string $type = '', int $code = 200, array $header = [], array $options = []) static 创建Response对象
  17. * @method void send() static 发送数据到客户端
  18. * @method \think\Response options(mixed $options = []) static 输出的参数
  19. * @method \think\Response data(mixed $data) static 输出数据设置
  20. * @method \think\Response header(mixed $name, string $value = null) static 设置响应头
  21. * @method \think\Response content(mixed $content) static 设置页面输出内容
  22. * @method \think\Response code(int $code) static 发送HTTP状态
  23. * @method \think\Response lastModified(string $time) static LastModified
  24. * @method \think\Response expires(string $time) static expires
  25. * @method \think\Response eTag(string $eTag) static eTag
  26. * @method \think\Response cacheControl(string $cache) static 页面缓存控制
  27. * @method \think\Response contentType(string $contentType, string $charset = 'utf-8') static 页面输出类型
  28. * @method mixed getHeader(string $name) static 获取头部信息
  29. * @method mixed getData() static 获取原始数据
  30. * @method mixed getContent() static 获取输出数据
  31. * @method int getCode() static 获取状态码
  32. */
  33. class Response extends Facade
  34. {
  35. /**
  36. * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
  37. * @access protected
  38. * @return string
  39. */
  40. protected static function getFacadeClass()
  41. {
  42. return 'response';
  43. }
  44. }