$value) { if (property_exists($this, $key)) { $this->{$key} = $value; } } } public function toArray(): array { return [ 'uid' => $this->uid, 'client' => $this->client, 'server' => $this->server, 'server_ip' => $this->server_ip, 'switch' => $this->switch, 'ip' => $this->ip, 'interface' => $this->interface, 'status' => $this->status, ]; } }