@@ 95-106 (lines=12) @@ | ||
92 | $name = (string)$serverNode->name; |
|
93 | $type = (string)$serverNode->type; |
|
94 | $params = array(); |
|
95 | foreach ($serverNode->params->param as $paramNode) { |
|
96 | $paramName = (string)$paramNode->name; |
|
97 | $paramType = (string)$paramNode->type; |
|
98 | $paramValue = (string)$paramNode; |
|
99 | // check if type boolen and transform true and false strings to int |
|
100 | if ($paramType === 'boolean') { |
|
101 | $paramValue = str_replace(array('true', 'false', '1', '0'), array(1, 0, 1, 0), $paramValue); |
|
102 | } |
|
103 | // set correct value type |
|
104 | settype($paramValue, $paramType); |
|
105 | $params[$paramName] = $paramValue; |
|
106 | } |
|
107 | $servers[$name] = array( |
|
108 | 'name' => $name, |
|
109 | 'type' => $type, |
@@ 90-101 (lines=12) @@ | ||
87 | $name = (string)$serverNode->attributes()->name; |
|
88 | $type = (string)$serverNode->attributes()->type; |
|
89 | $params = array(); |
|
90 | foreach ($serverNode->params->param as $paramNode) { |
|
91 | $paramName = (string)$paramNode->attributes()->name; |
|
92 | $paramType = (string)$paramNode->attributes()->type; |
|
93 | $paramValue = (string)$paramNode; |
|
94 | // check if type boolen and transform true and false strings to int |
|
95 | if ($paramType === 'boolean') { |
|
96 | $paramValue = str_replace(array('true', 'false', '1', '0'), array(1,0,1,0 ), $paramValue); |
|
97 | } |
|
98 | // set correct value type |
|
99 | settype($paramValue, $paramType); |
|
100 | $params[$paramName] = $paramValue; |
|
101 | } |
|
102 | $servers[$name] = array( |
|
103 | 'name' => $name, |
|
104 | 'type' => $type, |