File tree Expand file tree Collapse file tree 5 files changed +69
-48
lines changed Expand file tree Collapse file tree 5 files changed +69
-48
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Overtrue \LaravelWeChat \Events \OpenPlatform ;
1313
14- class Authorized
14+ /**
15+ * @method string getAppId()
16+ * @method string getCreateTime()
17+ * @method string getInfoType()
18+ * @method string getAuthorizerAppid()
19+ * @method string getAuthorizationCode()
20+ * @method string getAuthorizationCodeExpiredTime()
21+ * @method string getPreAuthCode()
22+ */
23+ class Authorized extends OpenPlatformEvent
1524{
16- public $ payload ;
17-
18- /**
19- * Create a new event instance.
20- *
21- * @param array $payload
22- */
23- public function __construct (array $ payload )
24- {
25- $ this ->payload = $ payload ;
26- }
2725}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of the overtrue/laravel-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 Overtrue \LaravelWeChat \Events \OpenPlatform ;
13+
14+ abstract class OpenPlatformEvent
15+ {
16+ /**
17+ * @var array
18+ */
19+ public $ payload ;
20+
21+ /**
22+ * Create a new event instance.
23+ *
24+ * @param array $payload
25+ */
26+ public function __construct (array $ payload )
27+ {
28+ $ this ->payload = $ payload ;
29+ }
30+
31+ public function __call ($ name , $ args )
32+ {
33+ return $ this ->payload [substr ($ name , 3 )] ?? null ;
34+ }
35+ }
Original file line number Diff line number Diff line change 1111
1212namespace Overtrue \LaravelWeChat \Events \OpenPlatform ;
1313
14- class Unauthorized
14+ /**
15+ * @method string getAppId()
16+ * @method string getCreateTime()
17+ * @method string getInfoType()
18+ * @method string getAuthorizerAppid()
19+ */
20+ class Unauthorized extends OpenPlatformEvent
1521{
16- public $ payload ;
17-
18- /**
19- * Create a new event instance.
20- *
21- * @param array $payload
22- */
23- public function __construct (array $ payload )
24- {
25- $ this ->payload = $ payload ;
26- }
2722}
Original file line number Diff line number Diff line change 1111
1212namespace Overtrue \LaravelWeChat \Events \OpenPlatform ;
1313
14- class UpdateAuthorized
14+ /**
15+ * @method string getAppId()
16+ * @method string getCreateTime()
17+ * @method string getInfoType()
18+ * @method string getAuthorizerAppid()
19+ * @method string getAuthorizationCode()
20+ * @method string getAuthorizationCodeExpiredTime()
21+ * @method string getPreAuthCode()
22+ */
23+ class UpdateAuthorized extends OpenPlatformEvent
1524{
16- public $ payload ;
17-
18- /**
19- * Create a new event instance.
20- *
21- * @param array $payload
22- */
23- public function __construct (array $ payload )
24- {
25- $ this ->payload = $ payload ;
26- }
2725}
Original file line number Diff line number Diff line change 1111
1212namespace Overtrue \LaravelWeChat \Events \OpenPlatform ;
1313
14- class VerifyTicketRefreshed
14+ /**
15+ * @method string getAppId()
16+ * @method string getCreateTime()
17+ * @method string getInfoType()
18+ * @method string getComponentVerifyTicket()
19+ */
20+ class VerifyTicketRefreshed extends OpenPlatformEvent
1521{
16- public $ payload ;
17-
18- /**
19- * Create a new event instance.
20- *
21- * @param array $payload
22- */
23- public function __construct (array $ payload )
24- {
25- $ this ->payload = $ payload ;
26- }
2722}
You can’t perform that action at this time.
0 commit comments