1 | <?php |
||
12 | final class PhpMailTransport implements TransportInterface |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var EnvelopeFactory |
||
17 | */ |
||
18 | private $envelopFactory; |
||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | private $parameters; |
||
23 | /** |
||
24 | * @var \Closure |
||
25 | */ |
||
26 | private $replacedMailMethod; |
||
27 | |||
28 | /** |
||
29 | * PhpMailTransport constructor. |
||
30 | * @param EnvelopeFactory $envelopFactory |
||
31 | * @param array $parameters |
||
32 | */ |
||
33 | 4 | public function __construct(EnvelopeFactory $envelopFactory, array $parameters = []) |
|
38 | |||
39 | /** |
||
40 | * @param MessageInterface $message |
||
41 | * @return void |
||
42 | */ |
||
43 | 4 | public function send(MessageInterface $message): void |
|
71 | |||
72 | /** |
||
73 | * @param MessageInterface $message |
||
74 | * @param string $name |
||
75 | * @return string |
||
76 | */ |
||
77 | 4 | private function extractSingleHeader(MessageInterface $message, string $name): string |
|
88 | |||
89 | /** |
||
90 | * @param MessageInterface $message |
||
91 | * @return string |
||
92 | */ |
||
93 | 2 | private function extractHeaders(MessageInterface $message): string |
|
119 | |||
120 | /** |
||
121 | * @param MessageInterface $message |
||
122 | * @return string |
||
123 | * @throws EnvelopeException |
||
124 | */ |
||
125 | 2 | private function constructParameters(MessageInterface $message): string |
|
136 | |||
137 | /** |
||
138 | * @param \Closure $callback |
||
139 | * @param EnvelopeFactory $envelopFactory |
||
140 | * @param array $parameters |
||
141 | * @return PhpMailTransport |
||
142 | */ |
||
143 | 4 | public static function newReplaceMailMethod( |
|
153 | } |