src/Entity/Contact.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Symfony\Component\Validator\Constraints as Assert;
  4. class Contact
  5. {
  6.     /**
  7.      * @var string|null
  8.      * @Assert\NotBlank()
  9.      * @Assert\Length(min=2, max=110)
  10.      */
  11.     private $firstname;
  12.     /**
  13.      * @var string|null
  14.      * @Assert\NotBlank()
  15.      * @Assert\Length(min=2, max=110)
  16.      */
  17.     private $lastname;
  18.     /**
  19.      * @var string|null
  20.      * @Assert\NotBlank()
  21.      * @Assert\Email()
  22.      */
  23.     private $email;
  24.     /**
  25.      * @var string|null
  26.      * @Assert\NotBlank()
  27.      * @Assert\Length(min=2, max=80)
  28.      */
  29.     private $subject;
  30.     /**
  31.      * @var string|null
  32.      * @Assert\NotBlank()
  33.      * @Assert\Length(min=10)
  34.      */
  35.     private $message;
  36.     /**
  37.      * @return null|string
  38.      */
  39.     public function getFirstname(): ?string
  40.     {
  41.         return $this->firstname;
  42.     }
  43.     /**
  44.      * @param null|string $firstname 
  45.      * @return Contact
  46.      */
  47.     public function setFirstname(?string $firstname): Contact
  48.     {
  49.         $this->firstname $firstname;
  50.         return $this;
  51.     }
  52.     /**
  53.      * @return null|string
  54.      */
  55.     public function getLastname(): ?string
  56.     {
  57.         return $this->lastname;
  58.     }
  59.     /**
  60.      * @param null|string $lastname
  61.      * @return Contact
  62.      */
  63.     public function setLastname(?string $lastname): Contact
  64.     {
  65.         $this->lastname $lastname;
  66.         return $this;
  67.     }
  68.     /**
  69.      * @return null|string
  70.      */
  71.     public function getEmail(): ?string
  72.     {
  73.         return $this->email;
  74.     }
  75.     /**
  76.      * @param null|string $email
  77.      * @return Contact
  78.      */
  79.     public function setEmail(?string $email): Contact
  80.     {
  81.         $this->email $email;
  82.         return $this;
  83.     }
  84.     /**
  85.      * @return null|string
  86.      */
  87.     public function getSubject(): ?string
  88.     {
  89.         return $this->subject;
  90.     }
  91.     /**
  92.      * @param null|string $subject
  93.      * @return Contact
  94.      */
  95.     public function setSubject(?string $subject): Contact
  96.     {
  97.         $this->subject $subject;
  98.         return $this;
  99.     }
  100.     /**
  101.      * @return null|string
  102.      */
  103.     public function getMessage(): ?string
  104.     {
  105.         return $this->message;
  106.     }
  107.     /**
  108.      * @param null|string $message
  109.      * @return Contact
  110.      */
  111.     public function setMessage(?string $message): Contact
  112.     {
  113.         $this->message $message;
  114.         return $this;
  115.     }
  116. }