/** * удаляет пользователя по id. */ public function deleteUser($id) { $sql = new RequestBuilder($this->dbInctance); $sql->delete()->from('^table', array('^table' => $this->dbStruct['table']))->where('^id = :val', array('^id' => $this->dbStruct['id'], ':val' => $id)); if (!$sql->query()->rowCount()) { throw new Exception("[" . __CLASS__ . "] Не удалось удалить запись! Возможно, она уже удалена."); } return new DeleteUser(array('result' => true)); }