Commit 00a22067dff6a9af74cef8f1e242aba547be8cae

Authored by Benjamin Renard
1 parent eebc2bb6

TT navigation

src/InputOutput/IHMImpl/Params/IHMInputOutputParamsAbstractClass.php
... ... @@ -52,24 +52,36 @@ abstract class IHMInputOutputParamsAbstractClass implements InputOutputInterface
52 52 /*
53 53 * @brief Unmarshall the time definition from the IHM request
54 54 */
55   - protected function unmarshallTimeDefinition($input, $requestIndex, $initTTIndex = false)
  55 + protected function unmarshallTimeDefinition($input, $requestIndex, $ttFileIndex = -1, $ttIntIndex = -1)
56 56 {
57 57 $timesNode = $this->paramsData->getRequestNodes()[$requestIndex]->getTimesNode();
58 58  
59 59 switch ($input->timesrc)
60 60 {
61 61 case "TimeTable" :
  62 + if (($ttFileIndex >= 0) && ($ttFileIndex >= count($input->timeTables)))
  63 + throw new Exception('Try to use a non-existing Time table index in the request.');
  64 +
  65 + $crtIndex = 0;
62 66 foreach ($input->timeTables as $tt)
63 67 {
  68 + if (($ttFileIndex >= 0 ) && ($ttFileIndex != $crtIndex))
  69 + {
  70 + // Do not plot this TT
  71 + ++$crtIndex;
  72 + continue;
  73 + }
  74 +
64 75 if (strpos($tt->id, "sharedtt_") === 0)
65 76 $ttPath = IHMConfigClass::getSharedTTPath();
66 77 else
67 78 $ttPath = IHMConfigClass::getUserTTPath();
68 79 $ttPath .= ($tt->id.".xml");
69 80 if (strpos($tt->id, "cat_") === 0)
70   - $timesNode->addCatalog($ttPath,$initTTIndex ? 0 : -1);
  81 + $timesNode->addCatalog($ttPath, $tt->{'timeTableName'}, $ttIntIndex);
71 82 else
72   - $timesNode->addTimeTable($ttPath,$initTTIndex ? 0 : -1);
  83 + $timesNode->addTimeTable($ttPath, $tt->{'timeTableName'}, $ttIntIndex);
  84 + ++$crtIndex;
73 85 }
74 86 break;
75 87 case "Interval" :
... ...
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... ... @@ -11,32 +11,95 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
11 11 {
12 12 private $isInteractiveRequest = false;
13 13  
  14 + private $interactiveRequestRealIndexes = array();
  15 + private $interactiveMultiPlotState = array();
  16 + private $interactiveTimeSelectionState = array();
  17 + private $interactiveCrtTTFileIndex = -1;
  18 +
14 19 /*
15 20 * @brief method to unmarshall a plot request
16 21 */
17 22 protected function unmarshallRequest($input)
18 23 {
  24 + $this->interactiveRequestRealIndexes = array();
  25 +
19 26 if (isset($input->{'action'}))
20 27 $input = $this->unmarshallActionRequest($input);
21 28 else
22 29 //save request
23 30 $this->saveIHMRequest($input);
24 31  
  32 + //Get active tab
  33 + $activeTab = NULL;
  34 + foreach ($input->tabs as $tab)
  35 + {
  36 + if ($tab->{'id'} == $input->{'last-plotted-tab'})
  37 + {
  38 + $activeTab = $tab;
  39 + }
  40 + }
  41 +
25 42 //Request
26   - $requestIndex = 0;
  43 + $requestIndexInParamData = 0;
  44 + $tabRequestIndex = 0;
27 45 $this->isInteractiveRequest = ($input->{'file-output'} == 'INTERACTIVE');
28 46 $postProcessCmd = "";
29 47 foreach ($input->tabs as $tab)
30 48 {
  49 + if (isset($activeTab))
  50 + {
  51 + if ($activeTab->{'multi-plot-linked'} && !$tab->{'multi-plot-linked'})
  52 + {
  53 + ++$tabRequestIndex;
  54 + //Tab is not linked to the Multi Plot Mode
  55 + continue;
  56 + }
  57 + else if (!$activeTab->{'multi-plot-linked'} && ($tab->{'id'} != $activeTab->{'id'}))
  58 + {
  59 + ++$tabRequestIndex;
  60 + //Plot only current active tab
  61 + continue;
  62 + }
  63 + else if (isset($input->{'force-single-replot'}) && $input->{'force-single-replot'} && ($tab->{'id'} != $activeTab->{'id'}))
  64 + {
  65 + ++$tabRequestIndex;
  66 + //Plot only current active tab when 'force-single-replot' is active
  67 + continue;
  68 + }
  69 + }
  70 +
31 71 $requestNode = $this->paramsData->addRequestNode();
  72 + $requestNode->setRealIndex($tabRequestIndex);
32 73 $outputsNode = $requestNode->getOutputsNode();
33 74 $paramsNode = $requestNode->getParamsNode();
34 75  
35 76 //unmarshall time definition
36 77 if ($tab->{'multi-plot-linked'})
37   - $this->unmarshallTimeDefinition($input, $requestIndex, $this->isInteractiveRequest && !$tab->{'page-superpose-mode'});
  78 + {
  79 + $isIntervalRequest = ($input->timesrc == 'Interval');
  80 + $ttFileIndex = -1;
  81 + $ttIntIndex = -1;
  82 + if ($this->isInteractiveRequest && !$isIntervalRequest && !$tab->{'page-superpose-mode'})
  83 + {
  84 + $ttFileIndex = !isset($activeTab->{'ttFileIndex'}) ? 0 : $activeTab->{'ttFileIndex'};
  85 + $ttIntIndex = !isset($activeTab->{'intIndex'}) ? 0 : $activeTab->{'intIndex'};
  86 + }
  87 + $this->unmarshallTimeDefinition($input, $requestIndexInParamData, $ttFileIndex, $ttIntIndex);
  88 + }
38 89 else
39   - $this->unmarshallTimeDefinition($tab, $requestIndex, $this->isInteractiveRequest && !$tab->{'page-superpose-mode'});
  90 + {
  91 + $isIntervalRequest = ($tab->timesrc == 'Interval');
  92 + $ttFileIndex = -1;
  93 + $ttIntIndex = -1;
  94 + if ($this->isInteractiveRequest && !$isIntervalRequest && !$tab->{'page-superpose-mode'})
  95 + {
  96 + $ttFileIndex = !isset($activeTab->{'ttFileIndex'}) ? 0 : $activeTab->{'ttFileIndex'};
  97 + $ttIntIndex = !isset($activeTab->{'intIndex'}) ? 0 : $activeTab->{'intIndex'};
  98 + }
  99 + $this->unmarshallTimeDefinition($tab, $requestIndexInParamData, $ttFileIndex, $ttIntIndex);
  100 + }
  101 +
  102 + $this->interactiveCrtTTFileIndex = $ttFileIndex;
40 103  
41 104 $plotOutputNode = $outputsNode->addNewOutput(RequestOutputTypeEnum::PLOT);
42 105  
... ... @@ -171,7 +234,12 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
171 234 }
172 235  
173 236 if ($this->isInteractiveRequest)
  237 + {
  238 + $this->interactiveRequestRealIndexes[PLOT_RESULT_FILE_KEY."_".$tab->{'id'}] = $tabRequestIndex;
  239 + $this->interactiveMultiPlotState[PLOT_RESULT_FILE_KEY."_".$tab->{'id'}] = $tab->{'multi-plot-linked'};
  240 + $this->interactiveTimeSelectionState[PLOT_RESULT_FILE_KEY."_".$tab->{'id'}] = $isIntervalRequest;
174 241 $this->paramsData->addWaitingResult(PLOT_RESULT_FILE_KEY."_".$tab->{'id'}, $waitingResultFile);
  242 + }
175 243 else
176 244 $this->paramsData->addWaitingResult(PLOT_RESULT_FILE_KEY, $waitingResultFile);
177 245  
... ... @@ -188,7 +256,8 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
188 256 if ($this->isInteractiveRequest && $isPortrait)
189 257 $postProcessCmd .= " | convert ".$waitingResultFile." -rotate -90 ".$waitingResultFile;
190 258  
191   - ++$requestIndex;
  259 + ++$tabRequestIndex;
  260 + ++$requestIndexInParamData;
192 261 }
193 262  
194 263 $this->paramsData->setBatchEnable(!(($fileFormat == RequestOutputPlotPageFormatEnum::PNG) && $this->isInteractiveRequest));
... ... @@ -1146,6 +1215,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
1146 1215 return $commonRes;
1147 1216 }
1148 1217  
  1218 + //Interactive request
1149 1219 if (!$data->getSuccess())
1150 1220 return array(
1151 1221 'success' => false,
... ... @@ -1162,6 +1232,10 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
1162 1232  
1163 1233 $result[] = array(
1164 1234 "id" => $key,
  1235 + "index" => $this->interactiveRequestRealIndexes[$key],
  1236 + "multiplot" => $this->interactiveMultiPlotState[$key],
  1237 + "isInterval" => $this->interactiveTimeSelectionState[$key],
  1238 + "ttFileIndex" => $this->interactiveCrtTTFileIndex,
1165 1239 "context" => IHMPlotContextFileClass::parse($this->getWorkingPath().$contextResult),
1166 1240 "plot" => $waitingResult
1167 1241 );
... ... @@ -1230,6 +1304,8 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
1230 1304 case 'extend' :
1231 1305 case 'shift' :
1232 1306 return $this->unmarshallNavigation($input, $plotInput);
  1307 + case 'goto' :
  1308 + return $this->unmarshallTTGoto($input, $plotInput);
1233 1309 default :
1234 1310 throw new Exception('Interactive action not implemented.');
1235 1311 }
... ... @@ -1237,82 +1313,65 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
1237 1313  
1238 1314 private function unmarshallZoom($input, $plotInput)
1239 1315 {
  1316 + //Find current tab
  1317 + $crtTab = NULL;
  1318 + foreach ($plotInput->{'tabs'} as $tab)
  1319 + {
  1320 + if ($input->{'tabId'} == PLOT_RESULT_FILE_KEY."_".$tab->{'id'})
  1321 + {
  1322 + $crtTab = $tab;
  1323 + break;
  1324 + }
  1325 + }
  1326 +
  1327 + if (!$crtTab)
  1328 + throw new Exception('Cannot retrieve plot tab for navigation action.');
  1329 +
1240 1330 if ($input->{'axeId'} == 'timeAxis')
1241 1331 {
1242   - //Time Axis
1243   - foreach ($plotInput->{'tabs'} as $tab)
  1332 + //Zoom on Time Axis
  1333 + if ($crtTab->{'multi-plot-linked'})
1244 1334 {
1245   - if ($input->{'tabId'} == PLOT_RESULT_FILE_KEY."_".$tab->{'id'})
1246   - {
1247   - if ($tab->{'multi-plot-linked'})
1248   - {
1249   - //Update multi plot time definition
1250   - $plotInput = $plotInput;
1251   - $plotInput->{'timesrc'} = 'Interval';
1252   - $plotInput->{'startDate'} = $input->{'min'};
1253   - $plotInput->{'stopDate'} = $input->{'max'};
1254   -
1255   - $interactiveInput = clone $plotInput;
1256   - $interactiveInput->{'tabs'} = array();
1257   - //Execute only tabs linked to the multi plot mode
1258   - foreach ($plotInput->{'tabs'} as $tab2)
1259   - {
1260   - if ($tab2->{'multi-plot-linked'})
1261   - $interactiveInput->{'tabs'}[] = $tab2;
1262   - }
1263   -
1264   - $this->saveIHMRequest($plotInput);
1265   - return $interactiveInput;
1266   - }
1267   - else
1268   - {
1269   - //Update tab time definition
1270   - $tab->{'timesrc'} = 'Interval';
1271   - $tab->{'startDate'} = $input->{'min'};
1272   - $tab->{'stopDate'} = $input->{'max'};
1273   - //Execute only concerning plot tabs
1274   - $interactiveInput = clone $plotInput;
1275   - $interactiveInput->{'tabs'} = array();
1276   - $interactiveInput->{'tabs'}[] = $tab;
1277   - $this->saveIHMRequest($plotInput);
1278   - return $interactiveInput;
1279   - }
1280   - }
  1335 + //Update multi plot time definition
  1336 + $plotInput->{'timesrc'} = 'Interval';
  1337 + $plotInput->{'startDate'} = $input->{'min'};
  1338 + $plotInput->{'stopDate'} = $input->{'max'};
1281 1339 }
1282   - throw new Exception('Cannot retrieve plot tab for zoom action.');
  1340 + else
  1341 + {
  1342 + $crtTab->{'timesrc'} = 'Interval';
  1343 + $crtTab->{'startDate'} = $input->{'min'};
  1344 + $crtTab->{'stopDate'} = $input->{'max'};
  1345 + }
  1346 +
  1347 + $plotInput->{'last-plotted-tab'} = $crtTab->{'id'};
  1348 + $this->saveIHMRequest($plotInput);
  1349 + return $plotInput;
1283 1350 }
1284 1351  
1285   - //Execute only concerning plot tabs
1286   - $interactiveInput = clone $plotInput;
1287   - $interactiveInput->{'tabs'} = array();
1288   - foreach ($plotInput->{'tabs'} as $tab)
  1352 + //Digital axis zoom
  1353 + foreach ($crtTab->{'panels'} as $panel)
1289 1354 {
1290   - if ($input->{'tabId'} == PLOT_RESULT_FILE_KEY."_".$tab->{'id'})
  1355 + if ($input->{'panelId'} == $panel->{'id'})
1291 1356 {
1292   - //Add current tab to interactive input
1293   - $interactiveInput->{'tabs'}[] = $tab;
1294   - foreach ($interactiveInput->{'tabs'}[0]->{'panels'} as $panel)
  1357 + foreach ($panel->{'axes'} as $axis)
1295 1358 {
1296   - if ($input->{'panelId'} == $panel->{'id'})
  1359 + if ($input->{'axeId'} == $axis->{'id'})
1297 1360 {
1298   - foreach ($panel->{'axes'} as $axis)
1299   - {
1300   - if ($input->{'axeId'} == $axis->{'id'})
1301   - {
1302   - $axis->{'axis-range-extend'} = false;
1303   - $axis->{'axis-range-min'} = $input->{'min'};
1304   - $axis->{'axis-range-max'} = $input->{'max'};
1305   - $this->saveIHMRequest($plotInput);
1306   - return $interactiveInput;
1307   - }
1308   - }
1309   - throw new Exception('Cannot retrieve axis for zoom action.');
  1361 + $axis->{'axis-range-extend'} = false;
  1362 + $axis->{'axis-range-min'} = $input->{'min'};
  1363 + $axis->{'axis-range-max'} = $input->{'max'};
  1364 + $plotInput->{'last-plotted-tab'} = $crtTab->{'id'};
  1365 + $this->saveIHMRequest($plotInput);
  1366 + //Do not save 'force-single-replot' in request file!
  1367 + $plotInput->{'force-single-replot'} = true;
  1368 + return $plotInput;
1310 1369 }
1311 1370 }
1312   - throw new Exception('Cannot retrieve plot panel for zoom action.');
  1371 + throw new Exception('Cannot retrieve axis for zoom action.');
1313 1372 }
1314 1373 }
1315   - throw new Exception('Cannot retrieve plot tab for zoom action.');
  1374 + throw new Exception('Cannot retrieve plot panel for zoom action.');
1316 1375 }
1317 1376  
1318 1377 private function unmarshallNavigation($input, $plotInput)
... ... @@ -1387,30 +1446,39 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass
1387 1446 {
1388 1447 $plotInput->{'startDate'} = $startTime;
1389 1448 $plotInput->{'stopDate'} = $stopTime;
1390   -
1391   - $interactiveInput = clone $plotInput;
1392   - $interactiveInput->{'tabs'} = array();
1393   - //Execute only tabs linked to the multi plot mode
1394   - foreach ($plotInput->{'tabs'} as $tab)
1395   - {
1396   - if ($tab->{'multi-plot-linked'})
1397   - $interactiveInput->{'tabs'}[] = $tab;
1398   - }
1399   - $this->saveIHMRequest($plotInput);
1400   - return $interactiveInput;
1401 1449 }
1402 1450 else
1403 1451 {
1404 1452 $crtTab->{'startDate'} = $startTime;
1405 1453 $crtTab->{'stopDate'} = $stopTime;
1406   -
1407   - $interactiveInput = clone $plotInput;
1408   - $interactiveInput->{'tabs'} = array();
1409   - //Execute only concerning plot tabs
1410   - $interactiveInput->{'tabs'}[] = $crtTab;
1411   - $this->saveIHMRequest($plotInput);
1412   - return $interactiveInput;
1413 1454 }
  1455 +
  1456 + $plotInput->{'last-plotted-tab'} = $crtTab->{'id'};
  1457 + $this->saveIHMRequest($plotInput);
  1458 + return $plotInput;
  1459 + }
  1460 +
  1461 + private function unmarshallTTGoto($input, $plotInput)
  1462 + {
  1463 + //Find current tab
  1464 + $crtTab = NULL;
  1465 + foreach ($plotInput->{'tabs'} as $tab)
  1466 + {
  1467 + if ($input->{'tabId'} == PLOT_RESULT_FILE_KEY."_".$tab->{'id'})
  1468 + {
  1469 + $crtTab = $tab;
  1470 + break;
  1471 + }
  1472 + }
  1473 +
  1474 + if (!$crtTab)
  1475 + throw new Exception('Cannot retrieve plot tab for navigation action.');
  1476 +
  1477 + $crtTab->{'ttFileIndex'} = $input->{'ttFileIndex'};
  1478 + $crtTab->{'intIndex'} = $input->{'intIndex'};
  1479 +
  1480 + $this->saveIHMRequest($plotInput);
  1481 + return $plotInput;
1414 1482 }
1415 1483 }
1416 1484 ?>
1417 1485 \ No newline at end of file
... ...
src/InputOutput/IHMImpl/Tools/IHMPlotContextFileClass.php
... ... @@ -25,6 +25,10 @@ class IHMPlotContextFileClass {
25 25 $pageContext = array(
26 26 'startTime' => $pageNode->getAttribute('startTime'),
27 27 'stopTime' => $pageNode->getAttribute('stopTime'),
  28 + 'superposeMode' => ($pageNode->getAttribute('stopTime') == "true"),
  29 + 'ttName' => $pageNode->getAttribute('ttName'),
  30 + 'ttIndex' => ($pageNode->getAttribute('ttIndex') == '') ? 0 : intval($pageNode->getAttribute('ttIndex')),
  31 + 'ttNbIntervals' => ($pageNode->getAttribute('ttNbIntervals') == '') ? 0 : intval($pageNode->getAttribute('ttNbIntervals')),
28 32 'portrait' => $isPortrait,
29 33 //An image rotation of 90 deg. is done after request execution if a page is in "portrait" mode
30 34 'width' => ($isPortrait ? intval($pageNode->getAttribute('height')) : intval($pageNode->getAttribute('width'))),
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestNodeClass.php
... ... @@ -65,6 +65,8 @@ define ("REQUEST_NAME", "request");
65 65 */
66 66 class RequestNodeClass extends NodeClass
67 67 {
  68 + private $realIndex = 0;
  69 +
68 70 public function __construct()
69 71 {
70 72 parent::__construct(REQUEST_NAME);
... ... @@ -88,6 +90,16 @@ class RequestNodeClass extends NodeClass
88 90 {
89 91 return $this->getFirstChildByName(REQUESTOUTPUTS_NAME);
90 92 }
  93 +
  94 + public function setRealIndex($index)
  95 + {
  96 + $this->realIndex = $index;
  97 + }
  98 +
  99 + public function getRealIndex()
  100 + {
  101 + return $this->realIndex;
  102 + }
91 103 }
92 104  
93 105 ?>
94 106 \ No newline at end of file
... ...
src/Request/ParamsRequestImpl/Nodes/Requests/RequestTimesNodeClass.php
... ... @@ -43,6 +43,7 @@ class RequestTimesIntervalNodeClass extends NodeClass
43 43  
44 44 define ("REQUESTTIMETABLE_NAME", "timetable");
45 45 define ("REQUESTTIMETABLE_ID", "id");
  46 +define ("REQUESTTIMETABLE_TTNAME", "name");
46 47 define ("REQUESTTIMETABLE_INDEX", "index");
47 48  
48 49 /**
... ... @@ -67,6 +68,16 @@ class RequestTimesTimeTableNodeClass extends NodeClass
67 68 return $this->getAttribute(REQUESTTIMETABLE_ID);
68 69 }
69 70  
  71 + public function setTTName($name)
  72 + {
  73 + $this->setAttribute(REQUESTTIMETABLE_TTNAME, $name);
  74 + }
  75 +
  76 + public function getTTName()
  77 + {
  78 + return $this->getAttribute(REQUESTTIMETABLE_TTNAME);
  79 + }
  80 +
70 81 public function setIndex($index)
71 82 {
72 83 $this->setAttribute(REQUESTTIMETABLE_INDEX, $index);
... ... @@ -80,6 +91,7 @@ class RequestTimesTimeTableNodeClass extends NodeClass
80 91  
81 92 define ("REQUESTCATALOG_NAME", "catalog");
82 93 define ("REQUESTCATALOG_ID", "id");
  94 +define ("REQUESTCATALOG_TTNAME", "name");
83 95 define ("REQUESTCATALOG_INDEX", "index");
84 96  
85 97 /**
... ... @@ -103,6 +115,16 @@ class RequestCatalogNodeClass extends NodeClass
103 115 {
104 116 return $this->getAttribute(REQUESTCATALOG_ID);
105 117 }
  118 +
  119 + public function setCatalogName($name)
  120 + {
  121 + $this->setAttribute(REQUESTCATALOG_TTNAME, $name);
  122 + }
  123 +
  124 + public function getCatalogName()
  125 + {
  126 + return $this->getAttribute(REQUESTCATALOG_TTNAME);
  127 + }
106 128  
107 129 public function setIndex($index)
108 130 {
... ... @@ -141,19 +163,23 @@ class RequestTimesNodeClass extends NodeClass
141 163 return $this->getChildrenByName(REQUESTTIMEINTERVAL_NAME);
142 164 }
143 165  
144   - public function addTimeTable($id, $index = -1)
  166 + public function addTimeTable($id, $name, $index = -1)
145 167 {
146 168 $timeTable = new RequestTimesTimeTableNodeClass();
147 169 $timeTable->setId($id);
  170 + if ($name != '')
  171 + $timeTable->setTTName($name);
148 172 if ($index >= 0)
149 173 $timeTable->setIndex($index);
150 174 $this->addChild($timeTable);
151 175 }
152 176  
153   - public function addCatalog($id, $index = -1)
  177 + public function addCatalog($id, $name, $index = -1)
154 178 {
155 179 $catalogNode = new RequestCatalogNodeClass();
156 180 $catalogNode->setId($id);
  181 + if ($name != '')
  182 + $catalogNode->setCatalogName($name);
157 183 if ($index >= 0)
158 184 $catalogNode->setIndex($index);
159 185 $this->addChild($catalogNode);
... ...
src/Request/ParamsRequestImpl/ParamsRequestClass.php
... ... @@ -23,13 +23,11 @@ class ParamsRequestClass extends ProcessRequestClass
23 23 {
24 24 case ParamsRequestTypeEnumClass::XMLREQUEST :
25 25 $cmd = "";
26   - $requestIndex = 0;
27 26 foreach ($this->requestData->getRequestNodes() as $requestNode)
28 27 {
29 28 if ($cmd != "")
30 29 $cmd .= " && ";
31   - $cmd .= KernelConfigClass::getKernelBinPath()."amdaXMLRequestorTool ".$this->getRequestFilePath($requestIndex);
32   - ++$requestIndex;
  30 + $cmd .= KernelConfigClass::getKernelBinPath()."amdaXMLRequestorTool ".$this->getRequestFilePath($requestNode->getRealIndex());
33 31 }
34 32 $this->requestData->setCmd($cmd);
35 33 break;
... ... @@ -62,7 +60,6 @@ class ParamsRequestClass extends ProcessRequestClass
62 60  
63 61 if ($this->requestData->getRequestType() == ParamsRequestTypeEnumClass::XMLREQUEST)
64 62 {
65   - $requestIndex = 0;
66 63 foreach ($this->requestData->getRequestNodes() as $requestNode)
67 64 {
68 65 //create XML request file
... ... @@ -72,25 +69,23 @@ class ParamsRequestClass extends ProcessRequestClass
72 69  
73 70 if (!$xmlNode = $requestNode->toXMLNode($doc))
74 71 {
75   - $this->requestData->setLastErrorMessage('Cannot create params request XML file for request '.$requestIndex);
  72 + $this->requestData->setLastErrorMessage('Cannot create params request XML file for request '.$requestNode->getRealIndex());
76 73 return false;
77 74 }
78 75  
79 76 $doc->appendChild($xmlNode);
80 77  
81   - if (!$doc->save($this->getRequestFilePath($requestIndex)))
  78 + if (!$doc->save($this->getRequestFilePath($requestNode->getRealIndex())))
82 79 {
83   - $this->requestData->setLastErrorMessage('Cannot save params request XML file for request '.$requestIndex);
  80 + $this->requestData->setLastErrorMessage('Cannot save params request XML file for request '.$requestNode->getRealIndex());
84 81 return false;
85 82 }
86 83  
87 84 if (!$doc->schemaValidate(KernelConfigClass::getXSDRequestFilePath()))
88 85 {
89   - $this->requestData->setLastErrorMessage('Params request XML file not valid for request '.$requestIndex);
  86 + $this->requestData->setLastErrorMessage('Params request XML file not valid for request '.$requestNode->getRealIndex());
90 87 return false;
91 88 }
92   -
93   - ++$requestIndex;
94 89 }
95 90 }
96 91  
... ...