public updateStatus ( string $serverStatus ) : DBServer | ||
$serverStatus | string | The status |
return | DBServer |
public function updateStatus($serverStatus)
{
if (!$this->serverId) {
throw new RuntimeException(sprintf("Server identifier has not been set in %s object yet.", get_class($this)));
}
$this->Db->Execute("\n UPDATE servers SET status = ? WHERE server_id = ?\n ", [$serverStatus, $this->serverId]);
$this->status = $serverStatus;
return $this;
}