Config.php 1.5 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\Config
  15. * @mixin \think\Config
  16. * @method array load(string $file, string $name = '') static 加载配置文件
  17. * @method bool has(string $name) static 检测配置是否存在
  18. * @method array pull(string $name) static 获取一级配置参数
  19. * @method mixed get(string $name,mixed $default = null) static 获取配置参数
  20. * @method array set(mixed $name, mixed $value = null) static 设置配置参数
  21. * @method array reset(string $name ='') static 重置配置参数
  22. * @method void remove(string $name = '') static 移除配置
  23. * @method void setYaconf(mixed $yaconf) static 设置开启Yaconf 或者指定配置文件名
  24. */
  25. class Config extends Facade
  26. {
  27. /**
  28. * 获取当前Facade对应类名(或者已经绑定的容器对象标识)
  29. * @access protected
  30. * @return string
  31. */
  32. protected static function getFacadeClass()
  33. {
  34. return 'config';
  35. }
  36. }