Total Complexity | 3 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class TwigSwiftMailer implements MailerInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var Swift_Mailer |
||
18 | */ |
||
19 | private $mailer; |
||
20 | |||
21 | /** |
||
22 | * @var SwiftMessageFactoryInterface |
||
23 | */ |
||
24 | private $messageFactory; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $templateName; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $fromEmail; |
||
35 | |||
36 | /** |
||
37 | * @var string|null |
||
38 | */ |
||
39 | private $replayToEmail; |
||
40 | |||
41 | /** |
||
42 | * @param Swift_Mailer $mailer |
||
43 | * @param SwiftMessageFactoryInterface $messageFactory |
||
44 | * @param string $templateName |
||
45 | * @param string $fromEmail |
||
46 | * @param string $replayToEmail |
||
47 | */ |
||
48 | public function __construct( |
||
49 | Swift_Mailer $mailer, |
||
50 | SwiftMessageFactoryInterface $messageFactory, |
||
51 | $templateName, |
||
52 | $fromEmail, |
||
53 | $replayToEmail = null |
||
54 | ) { |
||
55 | $this->mailer = $mailer; |
||
56 | $this->messageFactory = $messageFactory; |
||
57 | $this->templateName = $templateName; |
||
58 | $this->fromEmail = $fromEmail; |
||
59 | $this->replayToEmail = $replayToEmail; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @param EmailableInterface $to |
||
64 | * @return int |
||
65 | */ |
||
66 | public function send(EmailableInterface $to) |
||
75 | } |
||
76 | } |
||
77 |