1 | <?php |
||
20 | final class WebhookConsumer |
||
21 | { |
||
22 | /** @var HandlerInterface */ |
||
23 | private $handler; |
||
24 | |||
25 | /** @var WebhookRepositoryInterface */ |
||
26 | private $repository; |
||
27 | /** |
||
28 | * @var EventDispatcherInterface |
||
29 | */ |
||
30 | private $dispatcher; |
||
31 | |||
32 | /** |
||
33 | * @param HandlerInterface $handler |
||
34 | * @param WebhookRepositoryInterface $repository |
||
35 | * @param EventDispatcherInterface $dispatcher |
||
36 | */ |
||
37 | public function __construct( |
||
46 | |||
47 | /** |
||
48 | * @param $id |
||
49 | * |
||
50 | * @return void |
||
51 | */ |
||
52 | public function consume($id) |
||
82 | |||
83 | /** |
||
84 | * @param Webhook $webhook |
||
85 | */ |
||
86 | private function notifyFail(Webhook $webhook) |
||
90 | |||
91 | /** |
||
92 | * @param string $event |
||
93 | * @param Webhook $webhook |
||
94 | */ |
||
95 | private function notify(string $event, Webhook $webhook) |
||
99 | |||
100 | /** |
||
101 | * @param Webhook $webhook |
||
102 | */ |
||
103 | private function notifyRetry(Webhook $webhook) |
||
107 | |||
108 | /** |
||
109 | * @param Webhook $webhook |
||
110 | */ |
||
111 | private function notifyDone(Webhook $webhook) |
||
115 | } |