Cookie.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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\Cookie
  15. * @mixin \think\Cookie
  16. * @method void init(array $config = []) static 初始化
  17. * @method bool has(string $name,string $prefix = null) static 判断Cookie数据
  18. * @method mixed prefix(string $prefix = '') static 设置或者获取cookie作用域(前缀)
  19. * @method mixed get(string $name,string $prefix = null) static Cookie获取
  20. * @method mixed set(string $name, mixed $value = null, mixed $option = null) static 设置Cookie
  21. * @method void forever(string $name, mixed $value = null, mixed $option = null) static 永久保存Cookie数据
  22. * @method void delete(string $name, string $prefix = null) static Cookie删除
  23. * @method void clear($prefix = null) static Cookie清空
  24. */
  25. class Cookie extends Facade
  26. {
  27. /**
  28. * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
  29. * @access protected
  30. * @return string
  31. */
  32. protected static function getFacadeClass()
  33. {
  34. return 'cookie';
  35. }
  36. }