Scalr\Model\Entity\Server::updateStatus PHP Метод

updateStatus() публичный Метод

Updates Server status
public updateStatus ( string $serverStatus ) : Server
$serverStatus string The status
Результат Server
    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 " . $this->table() . " SET {$this->columnStatus} = " . $this->qstr('status', $serverStatus) . "\n            WHERE {$this->columnServerId} = " . $this->qstr('serverId', $this->serverId) . "\n        ");
        $this->status = $serverStatus;
        return $this;
    }