userTokens = new ArrayCollection(); $this->businesses = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } /** * A visual identifier that represents this user. * * @see UserInterface */ public function getUserIdentifier(): string { return (string) $this->email; } /** * @see UserInterface */ public function getRoles(): array { $roles = $this->roles; // guarantee every user at least has ROLE_USER $roles[] = 'ROLE_USER'; return array_unique($roles); } public function setRoles(array $roles): self { $this->roles = $roles; return $this; } /** * @see PasswordAuthenticatedUserInterface */ public function getPassword(): string { return $this->password; } public function setPassword(string $password): self { $this->password = $password; return $this; } /** * @see UserInterface */ public function eraseCredentials() { // If you store any temporary, sensitive data on the user, clear it here // $this->plainPassword = null; } /** * @return Collection */ public function getUserTokens(): Collection { return $this->userTokens; } public function addUserToken(UserToken $userToken): self { if (!$this->userTokens->contains($userToken)) { $this->userTokens->add($userToken); $userToken->setUser($this); } return $this; } public function removeUserToken(UserToken $userToken): self { if ($this->userTokens->removeElement($userToken)) { // set the owning side to null (unless already changed) if ($userToken->getUser() === $this) { $userToken->setUser(null); } } return $this; } public function getFullName(): ?string { return $this->fullName; } public function setFullName(string $fullName): self { $this->fullName = $fullName; return $this; } public function getDateRegister(): ?string { return $this->dateRegister; } public function setDateRegister(string $dateRegister): self { $this->dateRegister = $dateRegister; return $this; } /** * @return Collection */ public function getBusinesses(): Collection { return $this->businesses; } public function addBusiness(Business $business): self { if (!$this->businesses->contains($business)) { $this->businesses->add($business); $business->setOwner($this); } return $this; } public function removeBusiness(Business $business): self { if ($this->businesses->removeElement($business)) { // set the owning side to null (unless already changed) if ($business->getOwner() === $this) { $business->setOwner(null); } } return $this; } }