tag = $tag; } public function getId(): int { return $this->id; } public function setText(string $text): self { $this->text = $text; return $this; } public function getText(): string { return $this->text; } public function getOriginalTagText(): string { return $this->tag ? $this->tag->getText() : ''; } /** * Set post * * @todo move to constructor * * @param Post $post * @return PostTag */ public function setPost(Post $post = null): self { $this->post = $post; return $this; } public function getPost(): Post { return $this->post; } public function getTag(): Tag { return $this->tag; } }