From 34a30a7e4df0e84e1d485d006cbf2e2590674ac2 Mon Sep 17 00:00:00 2001 From: Elena.Budnik Date: Fri, 4 May 2018 17:54:52 +0200 Subject: [PATCH] auto fill of min/max for variable table from args --- src/Request/ParamInfoRequestClass.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Request/ParamInfoRequestClass.php b/src/Request/ParamInfoRequestClass.php index 340ee18..e4d97b5 100644 --- a/src/Request/ParamInfoRequestClass.php +++ b/src/Request/ParamInfoRequestClass.php @@ -145,7 +145,8 @@ class ParamInfoRequestClass extends RequestAbstractClass 'name' => $tableNode->getAttribute("name"), 'units' => $tableNode->getAttribute("units"), 'variable' => ($tableNode->getAttribute("variable") === "true"), - 'channels' => array() + 'channels' => array(), + 'minmax' => array() ); if (!$tableResult['variable']) { @@ -157,6 +158,14 @@ class ParamInfoRequestClass extends RequestAbstractClass ); } } + else { + if ($tableNode->hasAttribute("minValue")) { + $tableResult['minmax'] = array( + 'min' => $tableNode->getAttribute("minValue"), + 'max' => $tableNode->getAttribute("maxValue") + ); + } + } $result['tables'][] = $tableResult; } -- libgit2 0.21.2