| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- declare(strict_types=1);
- namespace App\Service\Mailer;
- use App\Entity\Message\Email as EmailEntity;
- use Doctrine\Common\Collections\ArrayCollection;
- /**
- * Classe Email qui contient les informations nécessaire pour assurer l'envoie d'un mail
- */
- class Email
- {
- private string $from;
- private string $fromName;
- private EmailEntity $emailEntity;
- private string $content;
- private ArrayCollection $emailRecipients;
- public function __construct()
- {
- $this->emailRecipients = new ArrayCollection();
- }
- public function getFrom(): string
- {
- return $this->from;
- }
- public function setFrom(string $from): self
- {
- $this->from = $from;
- return $this;
- }
- public function geFromName(): string
- {
- return $this->fromName;
- }
- public function setFromName(string $fromName): self
- {
- $this->fromName = $fromName;
- return $this;
- }
- public function getEmailEntity(): EmailEntity
- {
- return $this->emailEntity;
- }
- public function setEmailEntity(EmailEntity $emailEntity): self
- {
- $this->emailEntity = $emailEntity;
- return $this;
- }
- public function getContent(): string
- {
- return $this->content;
- }
- public function setContent(string $content): self
- {
- $this->content = $content;
- return $this;
- }
- public function addEmailRecipient(EmailRecipient $emailRecipients): self{
- $this->emailRecipients->add($emailRecipients);
- return $this;
- }
- public function getEmailRecipients(): ArrayCollection
- {
- return $this->emailRecipients;
- }
- }
|