files = new ArrayCollection(); $this->children = new ArrayCollection(); } public function getId(): int { return $this->id; } public function setCreatedAt(\DateTime $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getCreatedAt(): \DateTime { return $this->createdAt; } public function setText(string $text): self { $this->text = $text; return $this; } public function getText(): string { return $this->text; } public function setRec(bool $rec): self { $this->rec = $rec; return $this; } public function isRec(): bool { return $this->rec; } public function getRec(): bool { return $this->rec; } public function getPost(): Post { return $this->post; } public function setPost(Post $post): self { $this->post = $post; return $this; } public function setNumber(int $number): self { $this->number = $number; return $this; } public function getNumber(): int { return $this->number; } public function getAuthor(): User { return $this->author; } public function setAuthor(User $author): self { $this->author = $author; return $this; } public function addFile(File $files): self { $this->files[] = $files; return $this; } public function removeFile(File $files): void { $this->files->removeElement($files); } /** * @return File[]|ArrayCollection */ public function getFiles() { return $this->files; } /** * @return Comment */ public function getParent(): ?Comment { return $this->parent; } public function setParent(Comment $parent): self { $this->parent = $parent; return $this; } public function setDeleted(bool $deleted): self { $this->deleted = $deleted; return $this; } public function getDeleted(): bool { return $this->deleted; } public function isDeleted(): bool { return $this->deleted; } public function addChild(Comment $children): self { $this->children[] = $children; return $this; } public function removeChild(Comment $children): void { $this->children->removeElement($children); } /** * @return Comment[]|ArrayCollection */ public function getChildren() { return $this->children; } }