|
- <?php
-
- namespace domain\Communication\Email;
-
- use domain\_\AbstractBuilder;
-
- class EmailBuilder extends AbstractBuilder
- {
- public function instanciateEmail(
- string $fromName,
- string $fromEmail,
- string $subject,
- string $htmlContent,
- string $textContent
- ): Email
- {
- $email = new Email();
-
- $email->setFromName($fromName);
- $email->setFromEmail($fromEmail);
- $email->setSubject($subject);
- $email->setHtmlContent($htmlContent);
- $email->setTextContent($textContent);
-
- return $email;
- }
- }
|