Application.php 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. */
  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. SubscribeMessage\ServiceProvider::class,
  66. RealtimeLog\ServiceProvider::class,
  67. Search\ServiceProvider::class,
  68. Live\ServiceProvider::class,
  69. Broadcast\ServiceProvider::class,
  70. // Base services
  71. BasicService\Media\ServiceProvider::class,
  72. BasicService\ContentSecurity\ServiceProvider::class,
  73. ];
  74. /**
  75. * Handle dynamic calls.
  76. *
  77. * @param string $method
  78. * @param array $args
  79. *
  80. * @return mixed
  81. */
  82. public function __call($method, $args)
  83. {
  84. return $this->base->$method(...$args);
  85. }
  86. }