src/Entity/Contact.php line 6

Open in your IDE?
  1. <?php 
  2. namespace App\Entity;
  3. use Symfony\Component\Validator\Constraints as Assert;
  4. class Contact{
  5.     /**
  6.      * @var string|null
  7.      * @Assert\NotBlank()
  8.      * @Assert\Length(min=2, max=100)
  9.      */
  10.     private $firstname;
  11.     /**
  12.      * @var string|null
  13.      * @Assert\NotBlank()
  14.      * @Assert\Length(min=2, max=100)
  15.      */
  16.     private $lastname;
  17.     /**
  18.      * @var string|null
  19.      * @Assert\NotBlank()
  20.      * @Assert\Length(min=2, max=100)
  21.      */
  22.     private $phone;
  23.     /**
  24.      * @var string|null
  25.      * @Assert\NotBlank()
  26.      * @Assert\Length(min=2, max=100)
  27.      */
  28.     private $adress;
  29.     /**
  30.      * @var string|null
  31.      * @Assert\Length(min=2, max=100)
  32.      * @Assert\NotBlank(allowNull=true)
  33.      */
  34.     private $society;
  35.     /**
  36.      * @var string|null
  37.      * @Assert\NotBlank()
  38.      * @Assert\Email()
  39.      */
  40.     private $email;
  41.     /**
  42.      * @var string|null
  43.      * @Assert\NotBlank(
  44.      *  message="Votre message ne doit pas ĂȘtre vide."
  45.      * )
  46.      * @Assert\Length(min=10)
  47.      */
  48.     private $message;
  49.     private $confidentialite;
  50.     /**
  51.      * @param null|string $firstname
  52.      * @return Contact
  53.      */
  54.     public function setFirstname($firstname)
  55.     {
  56.         $this->firstname $firstname;
  57.         return $this;
  58.     }
  59.     /**
  60.      * @return null|string
  61.      */
  62.     public function getFirstname()
  63.     {
  64.         return $this->firstname;
  65.     }
  66.     /**
  67.      * @param null|string $lastname
  68.      * @return Contact
  69.      */
  70.     public function setLastname($lastname)
  71.     {
  72.         $this->lastname $lastname;
  73.         return $this;
  74.     }
  75.     /**
  76.      * @return null|string
  77.      */
  78.     public function getLastname()
  79.     {
  80.         return $this->lastname;
  81.     }
  82.     /**
  83.      * @param null|string $adress
  84.      * @return Contact
  85.      */
  86.     public function setAdress($adress)
  87.     {
  88.         $this->adress $adress;
  89.         return $this;
  90.     }
  91.     /**
  92.      * @return null|string
  93.      */
  94.     public function getAdress()
  95.     {
  96.         return $this->adress;
  97.     }
  98.     /**
  99.      * @param null|string $society
  100.      * @return Contact
  101.      */
  102.     public function setSociety($society)
  103.     {
  104.         $this->society $society;
  105.         return $this;
  106.     }
  107.     /**
  108.      * @return null|string
  109.      */
  110.     public function getSociety()
  111.     {
  112.         return $this->society;
  113.     }
  114.     /**
  115.      * @param null|string $phone
  116.      * @return Contact
  117.      */
  118.     public function setPhone($phone)
  119.     {
  120.         $this->phone $phone;
  121.         return $this;
  122.     }
  123.     /**
  124.      * @return null|string
  125.      */
  126.     public function getPhone()
  127.     {
  128.         return $this->phone;
  129.     }
  130.     /**
  131.      * @param null|string $email
  132.      * @return Contact
  133.      */
  134.     public function setEmail($email)
  135.     {
  136.         $this->email $email;
  137.         return $this;
  138.     }
  139.     /**
  140.      * @return null|string
  141.      */
  142.     public function getEmail()
  143.     {
  144.         return $this->email;
  145.     }
  146.     /**
  147.      * @param null|string $message
  148.      * @return Contact
  149.      */
  150.     public function setMessage($message)
  151.     {
  152.         $this->message $message;
  153.         return $this;
  154.     }
  155.     /**
  156.      * @return null|string
  157.      */
  158.     public function getMessage()
  159.     {
  160.         return $this->message;
  161.     }
  162.     /**
  163.      * @param $confidentialite
  164.      * @return Contact
  165.      */
  166.     public function setConfidentialite($confidentialite)
  167.     {
  168.         $this->confidentialite $confidentialite;
  169.         return $this;
  170.     }
  171.     /**
  172.      * @return null|boolean
  173.      */
  174.     public function getConfidentialite()
  175.     {
  176.         return $this->confidentialite;
  177.     }
  178. }