1 | <?php |
||
12 | class NotificationListener |
||
13 | { |
||
14 | /** |
||
15 | * 订阅的时间和处理的方法. |
||
16 | * |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $subscribe_events = [ |
||
20 | TopicUpVoted::class => 'handle', |
||
21 | NewReply::class => 'handle', |
||
22 | ]; |
||
23 | |||
24 | /** |
||
25 | * Jpush 对象 |
||
26 | * |
||
27 | * @var Jpush |
||
28 | */ |
||
29 | private $jpush = null; |
||
30 | /** |
||
31 | * @var NotificationRepositoryInterface |
||
32 | */ |
||
33 | private $notifications; |
||
34 | |||
35 | /** |
||
36 | * PushNotificationHandler constructor. |
||
37 | * |
||
38 | * @param NotificationRepositoryInterface $notifications |
||
39 | */ |
||
40 | public function __construct(NotificationRepositoryInterface $notifications) |
||
44 | |||
45 | /** |
||
46 | * 推送消息. |
||
47 | * |
||
48 | * @param $user_ids |
||
49 | * @param $msg |
||
50 | * @param $extras |
||
51 | */ |
||
52 | protected function push($user_ids, $msg, $extras = null) |
||
74 | |||
75 | /** |
||
76 | * Handle the event. |
||
77 | * |
||
78 | * @param Event|TopicUpVoted $event |
||
79 | */ |
||
80 | public function handle(Event $event) |
||
108 | |||
109 | /** |
||
110 | * 注册监听器给订阅者。. |
||
111 | * |
||
112 | * @param \Illuminate\Events\Dispatcher $events |
||
113 | */ |
||
114 | public function subscribe($events) |
||
120 | } |
||
121 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.