$value) { if (property_exists($this, $key)) { $this->{$key} = $value; } } } public function toArray(): array { return [ 'uid' => $this->uid, 'id' => $this->id, 'passwd' => $this->passwd, 'passwd_confirm' => $this->passwd_confirm, 'email' => $this->email, 'mobile' => $this->mobile, 'role' => $this->role, 'status' => $this->status, ]; } }