db = $db; $this->unitTestParamVm = new SqliteVM($db, true); $this->httpRequest = new HttpRequest(); $this->URL = $newURL; // get rid of the cookie jar... if (file_exists($this->httpRequest->cookieJar)) { unlink($this->httpRequest->cookieJar); } } function __destruct() { unset($this->unitTestParamVm); unset($this->httpRequest); unset($this->db); } function GetParam(&$arrayParam, $paramSet, $paramName) { $select = "Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"$paramName\""; $this->unitTestParamVm->Execute($select); $paramValue = $this->unitTestParamVm->GetString("ParamValue"); if (isset($paramValue) && strlen($paramValue) > 0) { $arrayParam[$paramName] = $paramValue; } } function GetMap($paramSet) { try { $arrayParam = array(); $arrayParam = Utils::SetCommonParams($paramSet, $this->db); $this->GetParam($arrayParam, $paramSet, "MAPDEFINITION"); $this->GetParam($arrayParam, $paramSet, "DWFVERSION"); $this->GetParam($arrayParam, $paramSet, "EMAPVERSION"); $this->GetParam($arrayParam, $paramSet, "SESSION"); $result = $this->httpRequest->SendRequest($this->URL, $arrayParam); if ($result->GetHttpStatusCode() != 559) { //$cookie = $this->httpRequest->GetCookie(); //if (strlen($cookie) <= 0) //{ // $result = new Result("No cookie created in GetMap", "text/plain", 559); //} } return $result; } catch (SqliteException $s) { return new Result($s->GetExceptionMessage().$this->unitTestParamVm->GetErrMsg(), "text/plain"); } } } ?>