$value) { if (property_exists($this, $key)) { $this->{$key} = $value; } } } public function toArray(): array { return [ 'uid' => $this->uid, 'user_uid' => $this->user_uid, 'title' => $this->title, 'content' => $this->content, 'status' => $this->status, ]; } }