1 | <?php |
||
19 | final class Transport implements TransportInterface |
||
20 | { |
||
21 | /** |
||
22 | * The adapter that is used to send the request. |
||
23 | * |
||
24 | * @var AdapterInterface |
||
25 | */ |
||
26 | private $adapter; |
||
27 | |||
28 | /** |
||
29 | * The url to call. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | private $url; |
||
34 | |||
35 | /** |
||
36 | * The user agent used to pass along during the request. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | private $userAgent; |
||
41 | |||
42 | /** |
||
43 | * Initializes a new instance of this class. |
||
44 | * |
||
45 | * @param AdapterInterface $adapter |
||
46 | * @param string $url |
||
47 | */ |
||
48 | public function __construct(AdapterInterface $adapter, string $url) |
||
54 | |||
55 | /** |
||
56 | * Gets the value of field "url". |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public function getUrl(): string |
||
64 | |||
65 | /** |
||
66 | * Gets the value of field "userAgent". |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | public function getUserAgent(): string |
||
74 | |||
75 | /** |
||
76 | * Sets the value of field "userAgent". |
||
77 | * |
||
78 | * @param string $userAgent |
||
79 | */ |
||
80 | public function setUserAgent(string $userAgent) |
||
84 | |||
85 | /** |
||
86 | * Sends the message. |
||
87 | * |
||
88 | * @param array $recipients A list with all recipients that should receive the message. |
||
89 | * @param Message $message The message to send. |
||
90 | * @return void |
||
91 | */ |
||
92 | public function send(array $recipients, Message $message): void |
||
102 | } |
||
103 |