src/Entity/User.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use DateTime;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Intl\Countries;
  8. use Symfony\Component\Security\Core\User\UserInterface;
  9. use Symfony\Component\Serializer\Annotation\Groups;
  10. /**
  11.  * User
  12.  *
  13.  * @ORM\Entity
  14.  */
  15. class User implements UserInterface
  16. {
  17.     /**
  18.      * @var int
  19.      *
  20.      * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true})
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="IDENTITY")
  23.      */
  24.     private $id;
  25.     /**
  26.      * @var string|null
  27.      *
  28.      * @ORM\Column(name="password", type="string", length=190, nullable=true)
  29.      */
  30.     private $password;
  31.     /**
  32.      * @var string|null
  33.      *
  34.      * @ORM\Column(name="email", type="string", length=190, nullable=true)
  35.      */
  36.     private $email;
  37.     /**
  38.      * @ORM\Column(type="string", length=100, nullable=true)
  39.      * @Groups({"api_login", "other_group"})
  40.      */
  41.     private $firstName;
  42.     /**
  43.      * @ORM\Column(type="string", length=100, nullable=true)
  44.      * @Groups({"api_login", "other_group"})
  45.      */
  46.     private $lastName;
  47.     /**
  48.      * @ORM\Column(type="string", length=50, nullable=true)
  49.      */
  50.     private $role;
  51.     /**
  52.      * @ORM\Column(type="string", length=100, nullable=true)
  53.      * @Groups({"api_login", "other_group"})
  54.      */
  55.     private $fullName;
  56.     /**
  57.      * @ORM\OneToOne(targetEntity=Media::class, cascade={"persist", "remove"})
  58.      */
  59.     private $avatar;
  60.     /**
  61.      * @ORM\Column(type="string", length=50, nullable=true)
  62.      * @Groups("api_login")
  63.      */
  64.     private $country;
  65.     /**
  66.      * @ORM\Column(type="string", length=50, nullable=true)
  67.      */
  68.     private $institution;
  69.     /**
  70.      * @ORM\Column(type="string", length=50, nullable=true)
  71.      */
  72.     private $departement;
  73.     /**
  74.      * @ORM\Column(type="string", length=50, nullable=true)
  75.      */
  76.     private $speciality;
  77.     /**
  78.      * @ORM\OneToMany(targetEntity="App\Entity\Publication", mappedBy="user")
  79.      *
  80.      */
  81.     private $publications;
  82.     /**
  83.      * @ORM\OneToMany(targetEntity="App\Entity\Allpublications", mappedBy="user")
  84.      */
  85.     private $allpublications;
  86.     /**
  87.      * @ORM\OneToMany(targetEntity="App\Entity\Book", mappedBy="user")
  88.      */
  89.     private $books;
  90.     /**
  91.      * @ORM\Column(type="integer", nullable=true)
  92.      */
  93.     private $verificationCode;
  94.     /**
  95.      * @ORM\OneToMany(targetEntity="App\Entity\Chapter", mappedBy="user")
  96.      */
  97.     private $chapters;
  98.     /**
  99.      * @ORM\OneToMany(targetEntity="App\Entity\Conference", mappedBy="user")
  100.      * @Groups("api_login")
  101.      */
  102.     private $conferences;
  103.     /**
  104.      * @ORM\ManyToMany(targetEntity="App\Entity\Journal", inversedBy="users")
  105.      */
  106.     private $favoriteJournals;
  107.     /**
  108.      * @ORM\ManyToMany(targetEntity="App\Entity\Follow", inversedBy="followers",cascade={"persist"})
  109.      * @Groups("api_login")
  110.      */
  111.     private $follows;
  112.     /**
  113.      * @ORM\ManyToMany(targetEntity="App\Entity\Category", inversedBy="users",cascade={"persist"})
  114.      */
  115.     private $categories;
  116.     /**
  117.      * @ORM\Column(type="string", length=100, nullable=true)
  118.      */
  119.     private $facebook;
  120.     /**
  121.      * @ORM\Column(type="string", length=100, nullable=true)
  122.      */
  123.     private $twitter;
  124.     /**
  125.      * @ORM\Column(type="string", length=100, nullable=true)
  126.      */
  127.     private $linkedIn;
  128.     /**
  129.      * @ORM\Column(type="string", length=100, nullable=true)
  130.      */
  131.     private $instagram;
  132.     /**
  133.      * @ORM\Column(type="string", length=100, nullable=true)
  134.      */
  135.     private $youtube;
  136.      /**
  137.      * @ORM\Column(type="datetime", nullable=true)
  138.      * @Groups("api_login")
  139.      */
  140.     private $createdAt;
  141.     /**
  142.      * @ORM\Column(type="datetime", nullable=true)
  143.      */
  144.     private $birthday;
  145.     /**
  146.      * @ORM\Column(type="string", length=50, nullable=true)
  147.      */
  148.     private $gender;
  149.     /**
  150.      *@ORM\Column(type="boolean", options={"default":"0"}, nullable=true)
  151.      */
  152.     private $isDeleted;
  153.     /**
  154.      * @ORM\Column(type="datetime", nullable=true)
  155.      */
  156.     private $deletedAt;
  157.     /**
  158.      * @ORM\Column(type="string", length=150, nullable=true)
  159.      */
  160.     private $deactivationReason;
  161.     /**
  162.      * @ORM\Column(type="string", length=50, nullable=true)
  163.      */
  164.     private $googleId;
  165.     /**
  166.      * @ORM\Column(type="string", length=50, nullable=true)
  167.      */
  168.     private $facebookId;
  169.     /**
  170.      * @ORM\Column(type="string", length=50, nullable=true)
  171.      */
  172.     private $linkedinId;
  173.     /**
  174.      * @ORM\Column(type="text", nullable=true)
  175.      */
  176.     private $pictureSocial;
  177.     /**
  178.      * @ORM\OneToMany(targetEntity=Comment::class, mappedBy="publisher", orphanRemoval=true)
  179.      * @Groups("api_login")
  180.      */
  181.     private $comments;
  182.     /**
  183.      * @ORM\OneToMany(targetEntity=Report::class, mappedBy="reporter", orphanRemoval=true)
  184.      * @Groups("api_login")
  185.      */
  186.     private $reports;
  187.     /**
  188.      * @ORM\OneToMany(targetEntity=Contribution::class, mappedBy="author", orphanRemoval=true)
  189.      */
  190.     private $contributions;
  191.     public function __construct()
  192.     {
  193.         $this->publications = new ArrayCollection();
  194.         $this->books = new ArrayCollection();
  195.         $this->chapters = new ArrayCollection();
  196.         $this->conferences = new ArrayCollection();
  197.         $this->follows = new ArrayCollection();
  198.         $this->categories = new ArrayCollection();
  199.         $this->comments = new ArrayCollection();
  200.         $this->reports = new ArrayCollection();
  201.         $this->contributions = new ArrayCollection();
  202.     }
  203.    /**
  204.      * @return mixed
  205.      * @Groups("api_login")
  206.      */
  207.     public function getCountry()
  208.     {
  209.         return $this->country;
  210.     }
  211.     /**
  212.      * @param string $country
  213.      */
  214.     public function setCountry($country): void
  215.     {
  216.         $this->country $country;
  217.     }
  218.     /**
  219.      * @return string
  220.      */
  221.     public function getDepartement()
  222.     {
  223.         return $this->departement;
  224.     }
  225.     /**
  226.      * @param string $departement
  227.      */
  228.     public function setDepartement($departement): void
  229.     {
  230.         $this->departement $departement;
  231.     }
  232.     /**
  233.      * @return string
  234.      */
  235.     public function getFullName()
  236.     {
  237.         return $this->fullName;
  238.     }
  239.     /**
  240.      * @param string $fullName
  241.      */
  242.     public function setFullName($fullName): void
  243.     {
  244.         $this->fullName $fullName;
  245.     }
  246.     /**
  247.      * @return string
  248.      */
  249.     public function getInstitution()
  250.     {
  251.         return $this->institution;
  252.     }
  253.     /**
  254.      * @param string $institution
  255.      */
  256.     public function setInstitution($institution): void
  257.     {
  258.         $this->institution $institution;
  259.     }
  260.     /**
  261.      * @return string
  262.      */
  263.     public function getSpeciality()
  264.     {
  265.         return $this->speciality;
  266.     }
  267.     /**
  268.      * @param string $speciality
  269.      */
  270.     public function setSpeciality($speciality): void
  271.     {
  272.         $this->speciality $speciality;
  273.     }
  274.     /**
  275.      * @return Collection|Publication[]
  276.      * @Groups("api_login")
  277.      */
  278.     public function getPublications(): Collection
  279.     {
  280.         return $this->publications;
  281.     }
  282.     public function addPublication(Publication $publication): self
  283.     {
  284.         if (!$this->publications->contains($publication)) {
  285.             $this->publications[] = $publication;
  286.             $publication->setRelation($this);
  287.         }
  288.         return $this;
  289.     }
  290.     public function removePublication(Publication $publication): self
  291.     {
  292.         if ($this->publications->contains($publication)) {
  293.             $this->publications->removeElement($publication);
  294.             // set the owning side to null (unless already changed)
  295.             if ($publication->getRelation() === $this) {
  296.                 $publication->setRelation(null);
  297.             }
  298.         }
  299.         return $this;
  300.     }
  301.     /**
  302.      * @return Collection|Book[]
  303.      */
  304.     public function getBooks(): Collection
  305.     {
  306.         return $this->books;
  307.     }
  308.     public function addBook(Book $book): self
  309.     {
  310.         if (!$this->books->contains($book)) {
  311.             $this->books[] = $book;
  312.             $book->setUser($this);
  313.         }
  314.         return $this;
  315.     }
  316.     public function removeBook(Book $book): self
  317.     {
  318.         if ($this->books->contains($book)) {
  319.             $this->books->removeElement($book);
  320.             // set the owning side to null (unless already changed)
  321.             if ($book->getUser() === $this) {
  322.                 $book->setUser(null);
  323.             }
  324.         }
  325.         return $this;
  326.     }
  327.     /**
  328.      * @return Collection|Chapter[]
  329.      * @Groups("api_login")
  330.      */
  331.     public function getChapters(): Collection
  332.     {
  333.         return $this->chapters;
  334.     }
  335.     public function addChapter(Chapter $chapter): self
  336.     {
  337.         if (!$this->chapters->contains($chapter)) {
  338.             $this->chapters[] = $chapter;
  339.             $chapter->setUser($this);
  340.         }
  341.         return $this;
  342.     }
  343.     public function removeChapter(Chapter $chapter): self
  344.     {
  345.         if ($this->chapters->contains($chapter)) {
  346.             $this->chapters->removeElement($chapter);
  347.             // set the owning side to null (unless already changed)
  348.             if ($chapter->getUser() === $this) {
  349.                 $chapter->setUser(null);
  350.             }
  351.         }
  352.         return $this;
  353.     }
  354.     /**
  355.      * @return Collection|Conference[]
  356.      */
  357.     public function getConferences(): Collection
  358.     {
  359.         return $this->conferences;
  360.     }
  361.     public function addConference(Conference $conference): self
  362.     {
  363.         if (!$this->conferences->contains($conference)) {
  364.             $this->conferences[] = $conference;
  365.             $conference->setUser($this);
  366.         }
  367.         return $this;
  368.     }
  369.     public function removeConference(Conference $conference): self
  370.     {
  371.         if ($this->conferences->contains($conference)) {
  372.             $this->conferences->removeElement($conference);
  373.             // set the owning side to null (unless already changed)
  374.             if ($conference->getUser() === $this) {
  375.                 $conference->setUser(null);
  376.             }
  377.         }
  378.         return $this;
  379.     }
  380.     public function getId(): ?int
  381.     {
  382.         return $this->id;
  383.     }
  384.     /**
  385.      * @ORM\Column(type="json", nullable=true)
  386.      */
  387.     private $roles = [];
  388.     /**
  389.      * @ORM\Column(type="boolean", options={"default":"0"})
  390.      */
  391.     private $is_verified false;
  392.     /**
  393.      * @ORM\Column(type="text", nullable=true)
  394.      */
  395.     private $token;
  396.     /**
  397.      * @ORM\Column(type="string", length=255, nullable=true)
  398.      */
  399.     private $phone;
  400.     /**
  401.      * @ORM\Column(type="string", length=255, nullable=true)
  402.      */
  403.     private $academic_mail;
  404.     /**
  405.      * @ORM\Column(type="string", length=255, nullable=true)
  406.      */
  407.     private $research_field;
  408.     /**
  409.      * @ORM\Column(type="string", length=255, nullable=true)
  410.      */
  411.     private $thesis_subject;
  412.     /**
  413.      * @ORM\Column(type="string", length=255, nullable=true)
  414.      */
  415.     private $thesis_director;
  416.     /**
  417.      * @ORM\Column(type="text", nullable=true)
  418.      */
  419.     private $team;
  420.     /**
  421.      * @ORM\Column(type="string", length=255, nullable=true)
  422.      */
  423.     private $research_lab;
  424.     /**
  425.      * @ORM\Column(type="string", length=255, nullable=true)
  426.      */
  427.     private $doctoral_school;
  428.     /**
  429.      * @ORM\Column(type="string", length=255, nullable=true)
  430.      */
  431.     private $university;
  432.     /**
  433.      * @ORM\Column(type="string", length=255, nullable=true)
  434.      */
  435.     private $location;
  436.     /**
  437.      * @ORM\Column(type="string", length=255, nullable=true)
  438.      */
  439.     private $laboratory_email;
  440.     public function setAddresse($adresse): void
  441.     {
  442.         $this->getContact()->addContactAddress($adresse) ;
  443.     }
  444.     /**
  445.      * @return Collection|Journal[]
  446.      * @
  447.      */
  448.     public function getFavoriteJournals(): Collection
  449.     {
  450.         return $this->favoriteJournals;
  451.     }
  452.     public function addFavoriteJournal(Journal $favoriteJournal): self
  453.     {
  454.         if (!$this->favoriteJournals->contains($favoriteJournal)) {
  455.             $this->favoriteJournals[] = $favoriteJournal;
  456.         }
  457.         return $this;
  458.     }
  459.     public function removeFavoriteJournal(Journal $favoriteJournal): self
  460.     {
  461.         if ($this->favoriteJournals->contains($favoriteJournal)) {
  462.             $this->favoriteJournals->removeElement($favoriteJournal);
  463.         }
  464.         return $this;
  465.     }
  466.     /**
  467.      * @return string
  468.      */
  469.     public function getApiBasePath(): string
  470.     {
  471.         return $this->apiBasePath;
  472.     }
  473.     /**
  474.      * @param string $apiBasePath
  475.      */
  476.     public function setApiBasePath(string $apiBasePath): void
  477.     {
  478.         $this->apiBasePath $apiBasePath;
  479.     }
  480.     /**
  481.      * @return mixed
  482.      */
  483.     public function getFacebook()
  484.     {
  485.         return $this->facebook;
  486.     }
  487.     /**
  488.      * @param mixed $facebook
  489.      */
  490.     public function setFacebook($facebook): void
  491.     {
  492.         $this->facebook $facebook;
  493.     }
  494.     /**
  495.      * @return mixed
  496.      */
  497.     public function getLinkedIn()
  498.     {
  499.         return $this->linkedIn;
  500.     }
  501.     /**
  502.      * @param mixed $linkedIn
  503.      */
  504.     public function setLinkedIn($linkedIn): void
  505.     {
  506.         $this->linkedIn $linkedIn;
  507.     }
  508.     /**
  509.      * @return mixed
  510.      */
  511.     public function getTwitter()
  512.     {
  513.         return $this->twitter;
  514.     }
  515.     /**
  516.      * @param mixed $twitter
  517.      */
  518.     public function setTwitter($twitter): void
  519.     {
  520.         $this->twitter $twitter;
  521.     }
  522.     /**
  523.      * @return mixed
  524.      */
  525.     public function getInstagram()
  526.     {
  527.         return $this->instagram;
  528.     }
  529.     /**
  530.      * @param mixed $instagram
  531.      */
  532.     public function setInstagram($instagram): void
  533.     {
  534.         $this->instagram $instagram;
  535.     }
  536.     /**
  537.      * @return mixed
  538.      */
  539.     public function getYoutube()
  540.     {
  541.         return $this->youtube;
  542.     }
  543.     /**
  544.      * @param mixed $youtube
  545.      */
  546.     public function setYoutube($youtube): void
  547.     {
  548.         $this->youtube $youtube;
  549.     }
  550.     /**
  551.      * @return mixed
  552.      */
  553.     public function getAllpublications()
  554.     {
  555.         return $this->allpublications;
  556.     }
  557.     /**
  558.      * @param mixed $allpublications
  559.      */
  560.     public function setAllpublications($allpublications): void
  561.     {
  562.         $this->allpublications $allpublications;
  563.     }
  564.     /**
  565.      * @return mixed
  566.      */
  567.     public function getFollows()
  568.     {
  569.         return $this->follows;
  570.     }
  571.     public function addFollow(Follow $follow): self
  572.     {
  573.         if (!$this->follows->contains($follow)) {
  574.             $this->follows[] = $follow;
  575.         }
  576.         return $this;
  577.     }
  578.     public function removeFollow(Follow $follow): self
  579.     {
  580.         if ($this->follows->contains($follow)) {
  581.             $this->follows->removeElement($follow);
  582.         }
  583.         return $this;
  584.     }
  585.     /**
  586.      * @return mixed
  587.      */
  588.     public function getCategories()
  589.     {
  590.         return $this->categories;
  591.     }
  592.     public function addCategory(Category $category): self
  593.     {
  594.         if (!$this->categories->contains($category)) {
  595.             $this->categories[] = $category;
  596.         }
  597.         return $this;
  598.     }
  599.     public function removeCategory(Category $category): self
  600.     {
  601.         if ($this->categories->contains($category)) {
  602.             $this->categories->removeElement($category);
  603.         }
  604.         return $this;
  605.     }
  606.     /**
  607.      * @return DateTime
  608.      */
  609.     public function getBirthday()
  610.     {
  611.         return $this->birthday;
  612.     }
  613.     /**
  614.      * @param  DateTime $birthday
  615.      */
  616.     public function setBirthday(?DateTime $birthday): void
  617.     {
  618.         $this->birthday $birthday;
  619.     }
  620.     /**
  621.      * @return String
  622.      */
  623.     public function getGender()
  624.     {
  625.         return $this->gender;
  626.     }
  627.     /**
  628.      * @param string $gender
  629.      */
  630.     public function setGender(?String $gender): void
  631.     {
  632.         $this->gender $gender;
  633.     }
  634.   /**
  635.      * @return DateTime
  636.      *
  637.      */
  638.     public function getCreatedAt()
  639.     {
  640.         return $this->createdAt;
  641.     }
  642.     /**
  643.      * @param mixed $createdAt
  644.      */
  645.     public function setCreatedAt($createdAt): void
  646.     {
  647.         $this->createdAt $createdAt;
  648.     }
  649.     /**
  650.      * @return bool
  651.      */
  652.     public function getDeleted()
  653.     {
  654.         return $this->isDeleted;
  655.     }
  656.     /**
  657.      * @param bool $deleted
  658.      */
  659.     public function setDeleted(bool $deleted): void
  660.     {
  661.         $this->isDeleted $deleted;
  662.     }
  663.     /**
  664.      * @return DateTime
  665.      */
  666.     public function getDeletedAt()
  667.     {
  668.         return $this->deletedAt;
  669.     }
  670.     /**
  671.      * @param  DateTime $deletedAt
  672.      */
  673.     public function setDeletedAt(DateTime $deletedAt): void
  674.     {
  675.         $this->deletedAt $deletedAt;
  676.     }
  677.     /**
  678.      * @return String
  679.      */
  680.     public function getDeactivationReason()
  681.     {
  682.         return $this->deactivationReason;
  683.     }
  684.     /**
  685.      * @param string $reason
  686.      */
  687.     public function setDeactivationReason(String $reason): void
  688.     {
  689.         $this->deactivationReason $reason;
  690.     }
  691.     /**
  692.      * @return mixed
  693.      */
  694.     public function getGoogleId()
  695.     {
  696.         return $this->googleId;
  697.     }
  698.     /**
  699.      * @param mixed $googleId
  700.      */
  701.     public function setGoogleId($googleId): void
  702.     {
  703.         $this->googleId $googleId;
  704.     }
  705.     /**
  706.      * @return mixed
  707.      */
  708.     public function getPictureSocial()
  709.     {
  710.         return $this->pictureSocial;
  711.     }
  712.     /**
  713.      * @param mixed $pictureSocial
  714.      */
  715.     public function setPictureSocial($pictureSocial): void
  716.     {
  717.         $this->pictureSocial $pictureSocial;
  718.     }
  719.     /**
  720.      * @return mixed
  721.      */
  722.     public function getFacebookId()
  723.     {
  724.         return $this->facebookId;
  725.     }
  726.     /**
  727.      * @param mixed $facebookId
  728.      */
  729.     public function setFacebookId($facebookId): void
  730.     {
  731.         $this->facebookId $facebookId;
  732.     }
  733.     /**
  734.      * @return mixed
  735.      */
  736.     public function getLinkedinId()
  737.     {
  738.         return $this->linkedinId;
  739.     }
  740.     /**
  741.      * @param mixed $linkedinId
  742.      */
  743.     public function setLinkedinId($linkedinId): void
  744.     {
  745.         $this->linkedinId $linkedinId;
  746.     }
  747.     /**
  748.      * @return Collection<int, Comment>
  749.      */
  750.     public function getComments(): Collection
  751.     {
  752.         return $this->comments;
  753.     }
  754.     public function addComment(Comment $comment): self
  755.     {
  756.         if (!$this->comments->contains($comment)) {
  757.             $this->comments[] = $comment;
  758.             $comment->setPublisher($this);
  759.         }
  760.         return $this;
  761.     }
  762.     public function removeComment(Comment $comment): self
  763.     {
  764.         if ($this->comments->removeElement($comment)) {
  765.             // set the owning side to null (unless already changed)
  766.             if ($comment->getPublisher() === $this) {
  767.                 $comment->setPublisher(null);
  768.             }
  769.         }
  770.         return $this;
  771.     }
  772.     /**
  773.      * @return Collection<int, Report>
  774.      */
  775.     public function getReports(): Collection
  776.     {
  777.         return $this->reports;
  778.     }
  779.     public function addReport(Report $report): self
  780.     {
  781.         if (!$this->reports->contains($report)) {
  782.             $this->reports[] = $report;
  783.             $report->setReporter($this);
  784.         }
  785.         return $this;
  786.     }
  787.     public function removeReport(Report $report): self
  788.     {
  789.         if ($this->reports->removeElement($report)) {
  790.             // set the owning side to null (unless already changed)
  791.             if ($report->getReporter() === $this) {
  792.                 $report->setReporter(null);
  793.             }
  794.         }
  795.         return $this;
  796.     }
  797.     /**
  798.      * @return Collection<int, Contribution>
  799.      */
  800.     public function getContributions(): Collection
  801.     {
  802.         return $this->contributions;
  803.     }
  804.     public function addContribution(Contribution $contribution): self
  805.     {
  806.         if (!$this->contributions->contains($contribution)) {
  807.             $this->contributions[] = $contribution;
  808.             $contribution->setAuthor($this);
  809.         }
  810.         return $this;
  811.     }
  812.     public function removeContribution(Contribution $contribution): self
  813.     {
  814.         if ($this->contributions->removeElement($contribution)) {
  815.             // set the owning side to null (unless already changed)
  816.             if ($contribution->getAuthor() === $this) {
  817.                 $contribution->setAuthor(null);
  818.             }
  819.         }
  820.         return $this;
  821.     }
  822.     public function getVerificationCode(): ?int
  823.     {
  824.         return $this->verificationCode;
  825.     }
  826.     public function setVerificationCode(?int $verificationCode): self
  827.     {
  828.         $this->verificationCode $verificationCode;
  829.         return $this;
  830.     }
  831.     public function getSalt()
  832.     {
  833.         // TODO: Implement getSalt() method.
  834.     }
  835.     public function eraseCredentials()
  836.     {
  837.         // TODO: Implement eraseCredentials() method.
  838.     }
  839.     public function getPassword(): ?string
  840.     {
  841.         return $this->password;
  842.     }
  843.     public function setPassword(?string $password): void
  844.     {
  845.         $this->password $password;
  846.     }
  847.     public function getUsername(): ?string
  848.     {
  849.         return $this->email;
  850.     }
  851.     public function setUsername(?string $email): void
  852.     {
  853.         $this->email $email;
  854.     }
  855.     public function getEmail(): ?string
  856.     {
  857.         return $this->email;
  858.     }
  859.     public function setEmail(?string $email): void
  860.     {
  861.         $this->email $email;
  862.     }
  863.     /**
  864.      * @return mixed
  865.      */
  866.     public function getIsDeleted()
  867.     {
  868.         return $this->isDeleted;
  869.     }
  870.     /**
  871.      * @param mixed $isDeleted
  872.      */
  873.     public function setIsDeleted($isDeleted): void
  874.     {
  875.         $this->isDeleted $isDeleted;
  876.     }
  877.     public function getRoles(): ?array
  878.     {
  879.         $roles$this->roles;
  880.         return $roles array_unique($roles) : ['ROLE_USER'];
  881.     }
  882.     public function addRole(string $role): self
  883.     {
  884.         $this->roles[] = $role;
  885.         return $this;
  886.     }
  887.     public function removeRole(string $role): self
  888.     {
  889.         if (false !== $key array_search($role$this->rolestrue)) {
  890.             unset($this->roles[$key]);
  891.             $this->roles array_values($this->roles);
  892.         }
  893.         return $this;
  894.     }
  895.     /**
  896.      * @return mixed
  897.      */
  898.     /**
  899.      * @return mixed
  900.      */
  901.     public function getLastName()
  902.     {
  903.         return $this->lastName;
  904.     }
  905.     /**
  906.      * @param mixed $lastName
  907.      */
  908.     public function setLastName($lastName): void
  909.     {
  910.         $this->lastName $lastName;
  911.     }
  912.     /**
  913.      * @return mixed
  914.      */
  915.     public function getFirstName()
  916.     {
  917.         return $this->firstName;
  918.     }
  919.     /**
  920.      * @param mixed $firstName
  921.      */
  922.     public function setFirstName($firstName): void
  923.     {
  924.         $this->firstName $firstName;
  925.     }
  926.     public function getIsVerified(): ?bool
  927.     {
  928.         return $this->is_verified;
  929.     }
  930.     public function setIsVerified(bool $is_verified): self
  931.     {
  932.         $this->is_verified $is_verified;
  933.         return $this;
  934.     }
  935.     public function getToken(): ?string
  936.     {
  937.         return $this->token;
  938.     }
  939.     public function setToken(?string $token): self
  940.     {
  941.         $this->token $token;
  942.         return $this;
  943.     }
  944.     /**
  945.      * @return mixed
  946.      */
  947.     public function getRole()
  948.     {
  949.         return $this->role;
  950.     }
  951.     /**
  952.      * @param mixed $role
  953.      */
  954.     public function setRole($role): void
  955.     {
  956.         $this->role $role;
  957.     }
  958.     public function getPhone(): ?string
  959.     {
  960.         return $this->phone;
  961.     }
  962.     public function setPhone(?string $phone): self
  963.     {
  964.         $this->phone $phone;
  965.         return $this;
  966.     }
  967.     public function getAvatar(): ?Media
  968.     {
  969.         return $this->avatar;
  970.     }
  971.     public function setAvatar(?Media $avatar): self
  972.     {
  973.         $this->avatar $avatar;
  974.         return $this;
  975.     }
  976.     public function getAcademicMail(): ?string
  977.     {
  978.         return $this->academic_mail;
  979.     }
  980.     public function setAcademicMail(?string $academic_mail): self
  981.     {
  982.         $this->academic_mail $academic_mail;
  983.         return $this;
  984.     }
  985.     public function getResearchField(): ?string
  986.     {
  987.         return $this->research_field;
  988.     }
  989.     public function setResearchField(?string $research_field): self
  990.     {
  991.         $this->research_field $research_field;
  992.         return $this;
  993.     }
  994.     public function getThesisSubject(): ?string
  995.     {
  996.         return $this->thesis_subject;
  997.     }
  998.     public function setThesisSubject(?string $thesis_subject): self
  999.     {
  1000.         $this->thesis_subject $thesis_subject;
  1001.         return $this;
  1002.     }
  1003.     public function getThesisDirector(): ?string
  1004.     {
  1005.         return $this->thesis_director;
  1006.     }
  1007.     public function setThesisDirector(?string $thesis_director): self
  1008.     {
  1009.         $this->thesis_director $thesis_director;
  1010.         return $this;
  1011.     }
  1012.     public function getTeam(): ?string
  1013.     {
  1014.         return $this->team;
  1015.     }
  1016.     public function setTeam(?string $team): self
  1017.     {
  1018.         $this->team $team;
  1019.         return $this;
  1020.     }
  1021.     public function getResearchLab(): ?string
  1022.     {
  1023.         return $this->research_lab;
  1024.     }
  1025.     public function setResearchLab(?string $research_lab): self
  1026.     {
  1027.         $this->research_lab $research_lab;
  1028.         return $this;
  1029.     }
  1030.     public function getDoctoralSchool(): ?string
  1031.     {
  1032.         return $this->doctoral_school;
  1033.     }
  1034.     public function setDoctoralSchool(?string $doctoral_school): self
  1035.     {
  1036.         $this->doctoral_school $doctoral_school;
  1037.         return $this;
  1038.     }
  1039.     public function getUniversity(): ?string
  1040.     {
  1041.         return $this->university;
  1042.     }
  1043.     public function setUniversity(?string $university): self
  1044.     {
  1045.         $this->university $university;
  1046.         return $this;
  1047.     }
  1048.     public function getLocation(): ?string
  1049.     {
  1050.         return $this->location;
  1051.     }
  1052.     public function setLocation(?string $location): self
  1053.     {
  1054.         $this->location $location;
  1055.         return $this;
  1056.     }
  1057.     public function getLaboratoryEmail(): ?string
  1058.     {
  1059.         return $this->laboratory_email;
  1060.     }
  1061.     public function setLaboratoryEmail(?string $laboratory_email): self
  1062.     {
  1063.         $this->laboratory_email $laboratory_email;
  1064.         return $this;
  1065.     }
  1066. }