db = $db; $this->unitTestParamVm = new SqliteVM($db, true); $this->httpRequest = new HttpRequest(); $this->URL = $newURL; } function __destruct() { unset($this->unitTestParamVm); unset($this->httpRequest); unset($this->db); } function GetCapabilities($paramSet) { try { $arrayParam = array(); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"request\""); $arrayParam["request"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"service\""); $arrayParam["service"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"VERSION\""); $arrayParam["VERSION"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } function GetMap($paramSet) { try { $arrayParam = array(); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"request\""); $arrayParam["request"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"service\""); $arrayParam["service"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"layers\""); $arrayParam["layers"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"srs\""); $arrayParam["srs"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"bbox\""); $arrayParam["bbox"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"width\""); $arrayParam["width"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"height\""); $arrayParam["height"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"format\""); $arrayParam["format"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"version\""); $arrayParam["version"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } function GetFeatureInfo($paramSet) { try { $arrayParam = array(); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"request\""); $arrayParam["request"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"service\""); $arrayParam["service"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"layers\""); $arrayParam["layers"]=$this->unitTestParamVm->GetString("ParamValue"); $arrayParam["query_layers"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"srs\""); $arrayParam["srs"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"bbox\""); $arrayParam["bbox"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"width\""); $arrayParam["width"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"height\""); $arrayParam["height"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"I\""); $arrayParam["I"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"J\""); $arrayParam["J"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"format\""); $arrayParam["format"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"version\""); $arrayParam["version"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"info_format\""); $arrayParam["info_format"]= $this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } } ?>