Express.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2024 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types=1);
  12. namespace app\common\library\express;
  13. use think\Manager;
  14. use app\common\library\express\provider\Driver;
  15. /**
  16. * 物流查询扩展
  17. * Class Express
  18. * @package app\common\library\express
  19. */
  20. class Express extends Manager
  21. {
  22. /**
  23. * 驱动的命名空间
  24. * @var string
  25. */
  26. protected $namespace = '\\app\\common\\library\\express\\provider\\driver\\';
  27. /**
  28. * 默认驱动
  29. */
  30. public function getDefaultDriver()
  31. {
  32. }
  33. /**
  34. * 连接或者切换驱动
  35. * @access public
  36. * @param string|null $name 驱动名称
  37. * @return Driver
  38. */
  39. public function store(string $name = null): Driver
  40. {
  41. return $this->driver($name);
  42. }
  43. /**
  44. * 设置api配置参数
  45. * @param array $options
  46. * @return Driver|null
  47. */
  48. public function setOptions(array $options): ?Driver
  49. {
  50. $this->store()->setOptions($options);
  51. return $this->store();
  52. }
  53. }