public function SetProperties(array $props)
{
if (empty($props)) {
return;
}
$values = [];
$stmt = '';
foreach ($props as $k => $v) {
$stmt .= ",(?, ?, ?)";
$values[] = $this->serverId;
$values[] = $k;
$values[] = $v;
}
if (empty($stmt)) {
return;
}
$this->Db->Execute("\n REPLACE `server_properties` (server_id, name, value)\n VALUES " . ltrim($stmt, ',') . "\n ", $values);
foreach ($props as $k => $v) {
$this->propsCache[$k] = $v;
}
}