src/Model/ContactDTO.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Model;
  3. use Symfony\Component\Validator\Constraints as Assert;
  4. class ContactDTO
  5. {
  6.     /**
  7.      * @var string|null
  8.      *
  9.      * @Assert\NotBlank(message="Veuillez renseigner votre prĂ©nom")
  10.      */
  11.     private $firstName;
  12.     /**
  13.      * @var string|null
  14.      *
  15.      * @Assert\NotBlank(message="Veuillez renseigner votre nom")
  16.      */
  17.     private $lastName;
  18.     /**
  19.      * @var string|null
  20.      *
  21.      */
  22.     private $phone;
  23.     /**
  24.      * @var string|null
  25.      *
  26.      * @Assert\NotBlank(message="Veuillez renseigner votre adresse mail")
  27.      * @Assert\Email(message="Adresse mail non valide")
  28.      */
  29.     private $email;
  30.     /**
  31.      * @var string|null
  32.      *
  33.      * @Assert\NotBlank(message="Veuillez renseigner le message")
  34.      */
  35.     private $message;
  36.     /**
  37.      * @return string|null
  38.      */
  39.     public function getFirstName(): ?string
  40.     {
  41.         return $this->firstName;
  42.     }
  43.     /**
  44.      * @param string|null $firstName
  45.      */
  46.     public function setFirstName(?string $firstName): void
  47.     {
  48.         $this->firstName $firstName;
  49.     }
  50.     /**
  51.      * @return string|null
  52.      */
  53.     public function getLastName(): ?string
  54.     {
  55.         return $this->lastName;
  56.     }
  57.     /**
  58.      * @param string|null $lastName
  59.      */
  60.     public function setLastName(?string $lastName): void
  61.     {
  62.         $this->lastName $lastName;
  63.     }
  64.     /**
  65.      * @return string|null
  66.      */
  67.     public function getPhone(): ?string
  68.     {
  69.         return $this->phone;
  70.     }
  71.     /**
  72.      * @param string|null $phone
  73.      */
  74.     public function setPhone(?string $phone): void
  75.     {
  76.         $this->phone $phone;
  77.     }
  78.     /**
  79.      * @return string|null
  80.      */
  81.     public function getEmail(): ?string
  82.     {
  83.         return $this->email;
  84.     }
  85.     /**
  86.      * @param string|null $email
  87.      */
  88.     public function setEmail(?string $email): void
  89.     {
  90.         $this->email $email;
  91.     }
  92.     /**
  93.      * @return string|null
  94.      */
  95.     public function getMessage(): ?string
  96.     {
  97.         return $this->message;
  98.     }
  99.     /**
  100.      * @param string|null $message
  101.      */
  102.     public function setMessage(?string $message): void
  103.     {
  104.         $this->message $message;
  105.     }
  106. }