$this->getId(), 'text' => $this->getText(), 'pseudo' => $this->getOwner()->getPseudo(), 'date' => $this->getCreatedAt(), ]; } function __construct() { $this->setCreatedAt( new \DateTime() ); } public function getId(): ?int { return $this->id; } public function getOwner(): ?Owner { return $this->owner; } public function setOwner( ?Owner $owner ): self { $this->owner = $owner; return $this; } public function getText(): ?string { return $this->text; } public function setText( string $text ): self { $this->text = $text; return $this; } public function getCreatedAt(): ?DateTimeInterface { return $this->createdAt; } public function setCreatedAt( DateTimeInterface $createdAt ): self { $this->createdAt = $createdAt; return $this; } public function getPoll(): ?Poll { return $this->poll; } public function setPoll( ?Poll $poll ): self { $this->poll = $poll; return $this; } public function getPseudo(): ?string { return $this->pseudo; } public function setPseudo(string $pseudo): self { $this->pseudo = $pseudo; return $this; } }