You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EmailBuilder.php 588B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace domain\Communication\Email;
  3. use domain\_\AbstractBuilder;
  4. class EmailBuilder extends AbstractBuilder
  5. {
  6. public function instanciateEmail(
  7. string $fromName,
  8. string $fromEmail,
  9. string $subject,
  10. string $htmlContent,
  11. string $textContent
  12. ): Email
  13. {
  14. $email = new Email();
  15. $email->setFromName($fromName);
  16. $email->setFromEmail($fromEmail);
  17. $email->setSubject($subject);
  18. $email->setHtmlContent($htmlContent);
  19. $email->setTextContent($textContent);
  20. return $email;
  21. }
  22. }