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->GetMessage(), "text/plain"); } } function DescribeFeatureType($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=\"typeName\""); $arrayParam["typeName"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetMessage(), "text/plain"); } } function GetFeature($paramSet, $request="GET") { 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=\"typeName\""); $arrayParam["typeName"]=$this->unitTestParamVm->GetString("ParamValue"); if($request=="POST") { return $this->httpRequest->SendRequest($this->URL, $arrayParam, "POST"); } else { return $this->httpRequest->SendRequest($this->URL, $arrayParam); } } catch (SqliteException $s) { return new Result($s->GetMessage(), "text/plain"); } } } ?>