1 | <?php |
||
19 | class MailService implements ServiceInterface |
||
20 | { |
||
21 | protected $viewPath = '@Da/User/resources/views/mail'; |
||
22 | |||
23 | protected $from; |
||
24 | protected $to; |
||
25 | protected $subject; |
||
26 | protected $view; |
||
27 | protected $params = []; |
||
28 | protected $mailer; |
||
29 | |||
30 | /** |
||
31 | * MailService constructor. |
||
32 | * |
||
33 | * @param string $from |
||
34 | * @param string $to |
||
35 | * @param string $subject |
||
36 | * @param string $view |
||
37 | * @param array $params |
||
38 | * @param BaseMailer|MailerInterface $mailer |
||
39 | */ |
||
40 | public function __construct($from, $to, $subject, $view, array $params, MailerInterface $mailer) |
||
51 | |||
52 | /** |
||
53 | * @param $name |
||
54 | * @param $value |
||
55 | * |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function setViewParam($name, $value) |
||
64 | |||
65 | /** |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function run() |
||
77 | } |
||
78 |