<?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;
    }

}