|
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\OpenPlatform\Authorizer\MiniProgram; |
|
13
|
|
|
|
|
14
|
|
|
use EasyWeChat\MiniProgram\Application as MiniProgram; |
|
15
|
|
|
use EasyWeChat\OpenPlatform\Authorizer\Aggregate\AggregateServiceProvider; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Class Application. |
|
19
|
|
|
* |
|
20
|
|
|
* @author mingyoung <[email protected]> |
|
21
|
|
|
* |
|
22
|
|
|
* @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Account\Client $account |
|
23
|
|
|
* @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Code\Client $code |
|
24
|
|
|
* @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Domain\Client $domain |
|
25
|
|
|
* @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Setting\Client $setting |
|
26
|
|
|
* @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Tester\Client $tester |
|
27
|
|
|
* @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Material\Client $material |
|
28
|
|
|
*/ |
|
29
|
|
|
class Application extends MiniProgram |
|
30
|
|
|
{ |
|
31
|
|
|
/** |
|
32
|
|
|
* Application constructor. |
|
33
|
|
|
* |
|
34
|
|
|
* @param array $config |
|
35
|
|
|
* @param array $prepends |
|
36
|
|
|
*/ |
|
37
|
2 |
|
public function __construct(array $config = [], array $prepends = []) |
|
38
|
|
|
{ |
|
39
|
2 |
|
parent::__construct($config, $prepends); |
|
40
|
|
|
|
|
41
|
|
|
$providers = [ |
|
42
|
2 |
|
AggregateServiceProvider::class, |
|
43
|
|
|
Code\ServiceProvider::class, |
|
44
|
|
|
Domain\ServiceProvider::class, |
|
45
|
|
|
Account\ServiceProvider::class, |
|
46
|
|
|
Setting\ServiceProvider::class, |
|
47
|
|
|
Tester\ServiceProvider::class, |
|
48
|
|
|
Material\ServiceProvider::class, |
|
49
|
|
|
]; |
|
50
|
|
|
|
|
51
|
2 |
|
foreach ($providers as $provider) { |
|
52
|
2 |
|
$this->register(new $provider()); |
|
53
|
|
|
} |
|
54
|
2 |
|
} |
|
55
|
|
|
} |
|
56
|
|
|
|