post_id = $post_id; $this->title = $title; $this->description = $description; $this->focus_keyphrase = $focus_keyphrase; } /** * Gets the ID of the post to update. * * @return int The ID of the post to update. */ public function get_post_id(): int { return $this->post_id; } /** * Gets the new title. * * @return string|null The new title, or null when the title should be left untouched. */ public function get_title(): ?string { return $this->title; } /** * Gets the new description. * * @return string|null The new description, or null when the description should be left untouched. */ public function get_description(): ?string { return $this->description; } /** * Gets the new focus keyphrase. * * @return string|null The new focus keyphrase, or null when the focus keyphrase should be left untouched. */ public function get_focus_keyphrase(): ?string { return $this->focus_keyphrase; } /** * Whether this update carries a title. An empty string is a value: it clears the title. * * @return bool Whether this update carries a title. */ public function has_title(): bool { return $this->title !== null; } /** * Whether this update carries a description. An empty string is a value: it clears the description. * * @return bool Whether this update carries a description. */ public function has_description(): bool { return $this->description !== null; } /** * Whether this update carries a focus keyphrase. An empty string is a value: it clears the focus keyphrase. * * @return bool Whether this update carries a focus keyphrase. */ public function has_focus_keyphrase(): bool { return $this->focus_keyphrase !== null; } }