$this->getId(), 'value' => $this->getValue(), 'choice_id' => $this->getChoice()->getId(), 'text' => $this->getChoice()->getName(), ]; } public function __construct() { $this->setCreationDate( new \DateTime() ); } public function getId(): ?int { return $this->id; } public function getPoll(): ?Poll { return $this->poll; } public function setPoll( ?Poll $poll ): self { $this->poll = $poll; if ( $poll ) { $poll->addVote( $this ); } return $this; } public function getChoice(): ?Choice { return $this->choice; } public function setChoice( ?Choice $choice ): self { $this->choice = $choice; return $this; } public function getValue(): ?string { return $this->value; } public function setValue( ?string $value ): self { $this->value = $value; return $this; } public function getCreationDate(): ?DateTimeInterface { return $this->creationDate; } public function setCreationDate( DateTimeInterface $creationDate ): self { $this->creationDate = $creationDate; return $this; } public function getStacksOfVotes(): ?StackOfVotes { return $this->stacksOfVotes; } public function setStacksOfVotes( ?StackOfVotes $stacksOfVotes ): self { $this->stacksOfVotes = $stacksOfVotes; return $this; } }