Application.php 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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\Live\Live $live
  38. * @property \EasyWeChat\MiniProgram\SubscribeMessage\Client $subscribe_message
  39. * @property \EasyWeChat\MiniProgram\RealtimeLog\Client $realtime_log
  40. * @property \EasyWeChat\MiniProgram\Search\Client $search
  41. * @property \EasyWeChat\MiniProgram\Ministore\Client $mini_store
  42. */
  43. class Application extends ServiceContainer
  44. {
  45. /**
  46. * @var array
  47. */
  48. protected $providers = [
  49. Auth\ServiceProvider::class,
  50. DataCube\ServiceProvider::class,
  51. AppCode\ServiceProvider::class,
  52. Server\ServiceProvider::class,
  53. TemplateMessage\ServiceProvider::class,
  54. CustomerService\ServiceProvider::class,
  55. UniformMessage\ServiceProvider::class,
  56. ActivityMessage\ServiceProvider::class,
  57. OpenData\ServiceProvider::class,
  58. Plugin\ServiceProvider::class,
  59. Base\ServiceProvider::class,
  60. Express\ServiceProvider::class,
  61. NearbyPoi\ServiceProvider::class,
  62. OCR\ServiceProvider::class,
  63. Soter\ServiceProvider::class,
  64. Mall\ServiceProvider::class,
  65. Live\ServiceProvider::class,
  66. SubscribeMessage\ServiceProvider::class,
  67. RealtimeLog\ServiceProvider::class,
  68. Search\ServiceProvider::class,
  69. // Base services
  70. BasicService\Media\ServiceProvider::class,
  71. BasicService\ContentSecurity\ServiceProvider::class,
  72. //todo 周 新增视频号
  73. Ministore\ServiceProvider::class,
  74. ];
  75. /**
  76. * Handle dynamic calls.
  77. *
  78. * @param string $method
  79. * @param array $args
  80. *
  81. * @return mixed
  82. */
  83. public function __call($method, $args)
  84. {
  85. return $this->base->$method(...$args);
  86. }
  87. }