polls = new ArrayCollection(); $this->comments = new ArrayCollection(); $this->stackOfVotes = 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; } public function getPseudo(): ?string { return $this->pseudo; } public function setPseudo( string $pseudo ): self { $this->pseudo = $pseudo; return $this; } /** * @return Collection|Poll[] */ public function getPolls(): Collection { return $this->polls; } public function addPoll( Poll $poll ): self { if ( ! $this->polls->contains( $poll ) ) { $this->polls[] = $poll; $poll->setOwner( $this ); } return $this; } public function removePoll( Poll $poll ): self { if ( $this->polls->contains( $poll ) ) { $this->polls->removeElement( $poll ); // set the owning side to null (unless already changed) if ( $poll->getOwner() === $this ) { $poll->setOwner( null ); } } return $this; } /** * @return Collection|Comment[] */ public function getComments(): Collection { return $this->comments; } public function addText( Comment $text ): self { if ( ! $this->comments->contains( $text ) ) { $this->comments[] = $text; $text->setOwner( $this ); } return $this; } public function removeText( Comment $text ): self { if ( $this->comments->contains( $text ) ) { $this->comments->removeElement( $text ); // set the owning side to null (unless already changed) if ( $text->getOwner() === $this ) { $text->setOwner( null ); } } return $this; } /** * @return Collection|StackOfVotes[] */ public function getStackOfVotes(): Collection { return $this->stackOfVotes; } public function addStackOfVote(StackOfVotes $stackOfVote): self { if (!$this->stackOfVotes->contains($stackOfVote)) { $this->stackOfVotes[] = $stackOfVote; $stackOfVote->setOwner($this); } return $this; } public function removeStackOfVote(StackOfVotes $stackOfVote): self { if ($this->stackOfVotes->contains($stackOfVote)) { $this->stackOfVotes->removeElement($stackOfVote); // set the owning side to null (unless already changed) if ($stackOfVote->getOwner() === $this) { $stackOfVote->setOwner(null); } } return $this; } }