Application.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. /*
  3. * This file is part of the overtrue/wechat.
  4. *
  5. * (c) overtrue <i@overtrue.me>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace EasyWeChat\MiniProgram;
  11. use EasyWeChat\BasicService;
  12. use EasyWeChat\Kernel\ServiceContainer;
  13. /**
  14. * Class Application.
  15. *
  16. * @author mingyoung <mingyoungcheung@gmail.com>
  17. *
  18. * @property \EasyWeChat\MiniProgram\Auth\AccessToken $access_token
  19. * @property \EasyWeChat\MiniProgram\DataCube\Client $data_cube
  20. * @property \EasyWeChat\MiniProgram\AppCode\Client $app_code
  21. * @property \EasyWeChat\MiniProgram\Auth\Client $auth
  22. * @property \EasyWeChat\OfficialAccount\Server\Guard $server
  23. * @property \EasyWeChat\MiniProgram\Encryptor $encryptor
  24. * @property \EasyWeChat\MiniProgram\TemplateMessage\Client $template_message
  25. * @property \EasyWeChat\OfficialAccount\CustomerService\Client $customer_service
  26. * @property \EasyWeChat\MiniProgram\Plugin\Client $plugin
  27. * @property \EasyWeChat\MiniProgram\Plugin\DevClient $plugin_dev
  28. * @property \EasyWeChat\MiniProgram\UniformMessage\Client $uniform_message
  29. * @property \EasyWeChat\MiniProgram\ActivityMessage\Client $activity_message
  30. * @property \EasyWeChat\MiniProgram\Express\Client $logistics
  31. * @property \EasyWeChat\MiniProgram\NearbyPoi\Client $nearby_poi
  32. * @property \EasyWeChat\MiniProgram\OCR\Client $ocr
  33. * @property \EasyWeChat\MiniProgram\Soter\Client $soter
  34. * @property \EasyWeChat\BasicService\Media\Client $media
  35. * @property \EasyWeChat\BasicService\ContentSecurity\Client $content_security
  36. * @property \EasyWeChat\MiniProgram\Mall\ForwardsMall $mall
  37. * @property \EasyWeChat\MiniProgram\SubscribeMessage\Client $subscribe_message
  38. * @property \EasyWeChat\MiniProgram\RealtimeLog\Client $realtime_log
  39. * @property \EasyWeChat\MiniProgram\Search\Client $search
  40. * @property \EasyWeChat\MiniProgram\Live\Client $live
  41. * @property \EasyWeChat\MiniProgram\Broadcast\Client $broadcast
  42. * @property \EasyWeChat\MiniProgram\UrlScheme\Client $url_scheme
  43. * @property \EasyWeChat\MiniProgram\Union\Client $union
  44. * @property \EasyWeChat\MiniProgram\Shop\Register\Client $shop_register
  45. * @property \EasyWeChat\MiniProgram\Shop\Basic\Client $shop_basic
  46. * @property \EasyWeChat\MiniProgram\Shop\Account\Client $shop_account
  47. * @property \EasyWeChat\MiniProgram\Shop\Spu\Client $shop_spu
  48. * @property \EasyWeChat\MiniProgram\Shop\Order\Client $shop_order
  49. * @property \EasyWeChat\MiniProgram\Shop\Delivery\Client $shop_delivery
  50. * @property \EasyWeChat\MiniProgram\Shop\Aftersale\Client $shop_aftersale
  51. * @property \EasyWeChat\MiniProgram\Business\Client $business
  52. * @property \EasyWeChat\MiniProgram\PhoneNumber\Client $phone_number
  53. */
  54. class Application extends ServiceContainer
  55. {
  56. /**
  57. * @var array
  58. */
  59. protected $providers = [
  60. Auth\ServiceProvider::class,
  61. DataCube\ServiceProvider::class,
  62. AppCode\ServiceProvider::class,
  63. Server\ServiceProvider::class,
  64. TemplateMessage\ServiceProvider::class,
  65. CustomerService\ServiceProvider::class,
  66. UniformMessage\ServiceProvider::class,
  67. ActivityMessage\ServiceProvider::class,
  68. OpenData\ServiceProvider::class,
  69. Plugin\ServiceProvider::class,
  70. Base\ServiceProvider::class,
  71. Express\ServiceProvider::class,
  72. NearbyPoi\ServiceProvider::class,
  73. OCR\ServiceProvider::class,
  74. Soter\ServiceProvider::class,
  75. Mall\ServiceProvider::class,
  76. SubscribeMessage\ServiceProvider::class,
  77. RealtimeLog\ServiceProvider::class,
  78. Search\ServiceProvider::class,
  79. Live\ServiceProvider::class,
  80. Broadcast\ServiceProvider::class,
  81. UrlScheme\ServiceProvider::class,
  82. Union\ServiceProvider::class,
  83. PhoneNumber\ServiceProvider::class,
  84. // Base services
  85. BasicService\Media\ServiceProvider::class,
  86. BasicService\ContentSecurity\ServiceProvider::class,
  87. Shop\Register\ServiceProvider::class,
  88. Shop\Basic\ServiceProvider::class,
  89. Shop\Account\ServiceProvider::class,
  90. Shop\Spu\ServiceProvider::class,
  91. Shop\Order\ServiceProvider::class,
  92. Shop\Delivery\ServiceProvider::class,
  93. Shop\Aftersale\ServiceProvider::class,
  94. Business\ServiceProvider::class,
  95. ];
  96. /**
  97. * Handle dynamic calls.
  98. *
  99. * @param string $method
  100. * @param array $args
  101. *
  102. * @return mixed
  103. */
  104. public function __call($method, $args)
  105. {
  106. return $this->base->$method(...$args);
  107. }
  108. }