123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\common\util\wechat;
- use app\common\util\SingleObjectClass;
- use EasyWeChat\Factory;
- use think\Log;
- class WechatMpSDK
- {
- protected $app;
-
- public function __construct($config = [])
- {
-
- $this->app = Factory::officialAccount($config);
- $cache = new WechatCache();
- $this->app->rebind('cache', $cache);
- Log::record($cache);
-
- }
-
- public function getApp()
- {
- return $this->app;
- }
- }
|