1 | <?php |
||
31 | class HttpProtocol implements ProtocolInterface |
||
32 | { |
||
33 | /** |
||
34 | * @var AuthenticatorInterface |
||
35 | */ |
||
36 | private $authenticator; |
||
37 | |||
38 | /** |
||
39 | * @var HttpSenderInterface |
||
40 | */ |
||
41 | private $httpSender; |
||
42 | |||
43 | /** |
||
44 | * @var PayloadEncoderInterface |
||
45 | */ |
||
46 | private $payloadEncoder; |
||
47 | |||
48 | /** |
||
49 | * @var UriFactoryInterface |
||
50 | */ |
||
51 | private $uriFactory; |
||
52 | |||
53 | /** |
||
54 | * @var HttpProtocolVisitorInterface |
||
55 | */ |
||
56 | private $visitor; |
||
57 | |||
58 | /** |
||
59 | * @var ExceptionFactoryInterface |
||
60 | */ |
||
61 | private $exceptionFactory; |
||
62 | |||
63 | /** |
||
64 | * Constructor. |
||
65 | * |
||
66 | * @param AuthenticatorInterface $authenticator |
||
67 | * @param HttpSenderInterface $httpSender |
||
68 | * @param PayloadEncoderInterface $payloadEncoder |
||
69 | * @param UriFactoryInterface $uriFactory |
||
70 | * @param HttpProtocolVisitorInterface $visitor |
||
71 | * @param ExceptionFactoryInterface $exceptionFactory |
||
72 | */ |
||
73 | public function __construct( |
||
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | * |
||
92 | * @throws HttpSenderException |
||
93 | */ |
||
94 | public function send(Receiver $receiver, Notification $notification, bool $sandbox): void |
||
104 | |||
105 | /** |
||
106 | * {@inheritdoc} |
||
107 | */ |
||
108 | public function closeConnection(): void |
||
112 | |||
113 | /** |
||
114 | * Inner send process |
||
115 | * |
||
116 | * @param Receiver $receiver |
||
117 | * @param Notification $notification |
||
118 | * @param bool $sandbox |
||
119 | * |
||
120 | * @throws SendNotificationException |
||
121 | * @throws HttpSenderException |
||
122 | */ |
||
123 | private function doSend(Receiver $receiver, Notification $notification, bool $sandbox): void |
||
147 | } |
||
148 |