1 | <?php |
||
22 | class FeedbackSender extends BaseObject |
||
23 | { |
||
24 | /** |
||
25 | * @var FeedbackForm |
||
26 | */ |
||
27 | private $feedbackForm; |
||
28 | /** |
||
29 | * @var MailerInterface |
||
30 | */ |
||
31 | private $mailer; |
||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | public $from; |
||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | public $to; |
||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | public $subject; |
||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | public $view; |
||
48 | |||
49 | /** |
||
50 | * FeedbackSender constructor. |
||
51 | * @param FeedbackForm $feedbackForm |
||
52 | * @param MailerInterface $mailer |
||
53 | * @param array $options |
||
54 | */ |
||
55 | public function __construct($feedbackForm, MailerInterface $mailer, $options = []) |
||
64 | |||
65 | /** |
||
66 | * @throws InvalidConfigException when one of required configuration fields is not filled properly |
||
67 | */ |
||
68 | private function checkOptions() |
||
76 | |||
77 | /** |
||
78 | * @return bool whether email was sent successfully |
||
79 | */ |
||
80 | public function send() |
||
91 | } |
||
92 |