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 DescribeDrawing($paramSet) { try { $arrayParam = array(); $arrayParam = Utils::SetCommonParams($paramSet, $this->db); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"RESOURCEID\""); $arrayParam["RESOURCEID"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } function GetDrawing($paramSet) { try { $arrayParam = array(); $arrayParam = Utils::SetCommonParams($paramSet, $this->db); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"RESOURCEID\""); $arrayParam["RESOURCEID"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } function EnumerateDrawingLayers($paramSet) { try { $arrayParam = array(); $arrayParam = Utils::SetCommonParams($paramSet, $this->db); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"RESOURCEID\""); $arrayParam["RESOURCEID"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"SECTION\""); $arrayParam["SECTION"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } function GetDrawingLayer($paramSet) { try { $arrayParam = array(); $arrayParam = Utils::SetCommonParams($paramSet, $this->db); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"RESOURCEID\""); $arrayParam["RESOURCEID"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"SECTION\""); $arrayParam["SECTION"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"LAYER\""); $arrayParam["LAYER"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } function GetDrawingSection($paramSet) { try { $arrayParam = array(); $arrayParam = Utils::SetCommonParams($paramSet, $this->db); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"RESOURCEID\""); $arrayParam["RESOURCEID"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"SECTION\""); $arrayParam["SECTION"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } function GetDrawingSectionResource($paramSet) { try { $arrayParam = array(); $arrayParam = Utils::SetCommonParams($paramSet, $this->db); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"RESOURCEID\""); $arrayParam["RESOURCEID"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"RESOURCENAME\""); $arrayParam["RESOURCENAME"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } function EnumerateDrawingSections($paramSet) { try { $arrayParam = array(); $arrayParam = Utils::SetCommonParams($paramSet, $this->db); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"RESOURCEID\""); $arrayParam["RESOURCEID"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } function EnumerateDrawingSectionResources($paramSet) { try { $arrayParam = array(); $arrayParam = Utils::SetCommonParams($paramSet, $this->db); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"RESOURCEID\""); $arrayParam["RESOURCEID"]=$this->unitTestParamVm->GetString("ParamValue"); $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"SECTION\""); $arrayParam["SECTION"]=$this->unitTestParamVm->GetString("ParamValue"); return $this->httpRequest->SendRequest($this->URL, $arrayParam); } catch (SqliteException $s) { return new Result($s->GetExceptionMessage(), "text/plain"); } } } ?>