public function __toString() { if (!count($this->set)) { throw new SqlException("Não foram definidas as colunas para a atualização"); } $this->queryString = "UPDATE {$this->tabela} SET "; foreach (array_keys($this->set) as $coluna) { $this->queryString .= "{$coluna} = :{$coluna}, "; } $this->queryString = substr($this->queryString, 0, -2); $this->queryString .= " {$this->where} "; return parent::__toString(); }