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\BasicService\Media\Client $media |
31
|
|
|
* @property \EasyWeChat\BasicService\ContentSecurity\Client $content_security |
32
|
|
|
* @property \EasyWeChat\MiniProgram\Plugin\Client $plugin |
33
|
|
|
* @property \EasyWeChat\MiniProgram\UniformMessage\Client $uniform_message |
34
|
|
|
* @property \EasyWeChat\MiniProgram\ActivityMessage\Client $activity_message |
35
|
|
|
*/ |
36
|
|
|
class Application extends ServiceContainer |
37
|
|
|
{ |
38
|
|
|
/** |
39
|
|
|
* @var array |
40
|
|
|
*/ |
41
|
|
|
protected $providers = [ |
42
|
|
|
Auth\ServiceProvider::class, |
43
|
|
|
DataCube\ServiceProvider::class, |
44
|
|
|
AppCode\ServiceProvider::class, |
45
|
|
|
Server\ServiceProvider::class, |
46
|
|
|
TemplateMessage\ServiceProvider::class, |
47
|
|
|
CustomerService\ServiceProvider::class, |
48
|
|
|
UniformMessage\ServiceProvider::class, |
49
|
|
|
ActivityMessage\ServiceProvider::class, |
50
|
|
|
// Base services |
51
|
|
|
BasicService\Media\ServiceProvider::class, |
52
|
|
|
BasicService\ContentSecurity\ServiceProvider::class, |
53
|
|
|
OpenData\ServiceProvider::class, |
54
|
|
|
Plugin\ServiceProvider::class, |
55
|
|
|
Base\ServiceProvider::class, |
56
|
|
|
]; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Handle dynamic calls. |
60
|
|
|
* |
61
|
|
|
* @param string $method |
62
|
|
|
* @param array $args |
63
|
|
|
* |
64
|
|
|
* @return mixed |
65
|
|
|
*/ |
66
|
|
|
public function __call($method, $args) |
67
|
|
|
{ |
68
|
|
|
return $this->base->$method(...$args); |
|
|
|
|
69
|
|
|
} |
70
|
|
|
} |
71
|
|
|
|