src/Model/Followup.php line 7

  1. <?php
  2. namespace App\Model;
  3. use Symfony\Component\Validator\Constraints as Assert;
  4. class Followup
  5. {
  6.     #[Assert\NotBlank(message"Le mail est obligatoire")]
  7.     #[Assert\Email(message"Le mail est incorrect")]
  8.     private string $email;
  9.     #[Assert\NotBlank(message"La référence est obligatoire")]
  10.     private string $reference;
  11.     public function getEmail(): string
  12.     {
  13.         return $this->email;
  14.     }
  15.     public function setEmail(string $email): self
  16.     {
  17.         $this->email $email;
  18.         return $this;
  19.     }
  20.     public function getReference(): string
  21.     {
  22.         return $this->reference;
  23.     }
  24.     public function setReference(string $reference): self
  25.     {
  26.         $this->reference $reference;
  27.         return $this;
  28.     }
  29.     public function __toArray()
  30.     {
  31.         return call_user_func('get_object_vars'$this);
  32.     }
  33. }