<?php

namespace AppBundle\Mail\Model;

use Doctrine\Common\Collections\ArrayCollection;

class MailPreview
{
    /**
     * @var ArrayCollection
     */
    private $mails;


    /**
     * 
     */
    public function __construct()
    {
        $this->mails = new ArrayCollection();
    }


    /**
     * Add Mail
     *
     * @param Mail $mail
     * @return MailPreview
     */
    public function addMail(Mail $mail)
    {
        $this->mails[] = $mail;

        return $this;
    }

    /**
     * Remove mail
     *
     * @param Mail $mail
     */
    public function removeMail(Mail $mail)
    {
        $this->mails->removeElement($mail);
    }

    /**
     * Get mails
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getMails()
    {
        return $this->mails;
    }
}
