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