@@ 200-209 (lines=10) @@ | ||
197 | return $this->xml->getSimpleXmlElement(); |
|
198 | ||
199 | $arrBuff = $this->temperatures(); |
|
200 | if (sizeof($arrBuff) > 0) { |
|
201 | $temp = $this->xml->addChild("Temperatures"); |
|
202 | foreach ($arrBuff as $arrValue) { |
|
203 | $item = $temp->addChild('Item'); |
|
204 | $item->addAttribute('Label', $arrValue['label']); |
|
205 | $item->addAttribute('Value', $arrValue['value']); |
|
206 | $item->addAttribute('State', $arrValue['state']); |
|
207 | if (isset($arrValue['Max'])) $item->addAttribute('Max', $arrValue['Max']); |
|
208 | } |
|
209 | } |
|
210 | $arrBuff = $this->voltages(); |
|
211 | if (sizeof($arrBuff) > 0) { |
|
212 | $volt = $this->xml->addChild('Voltages'); |
|
@@ 223-232 (lines=10) @@ | ||
220 | } |
|
221 | } |
|
222 | $arrBuff = $this->fans(); |
|
223 | if (sizeof($arrBuff) > 0) { |
|
224 | $fan = $this->xml->addChild('Fans'); |
|
225 | foreach ($arrBuff as $arrValue) { |
|
226 | $item = $fan->addChild('Item'); |
|
227 | $item->addAttribute('Label', $arrValue['label']); |
|
228 | $item->addAttribute('Value', $arrValue['value']); |
|
229 | $item->addAttribute('State', $arrValue['state']); |
|
230 | if (isset($arrValue['Min'])) $item->addAttribute('Min', $arrValue['min']); |
|
231 | } |
|
232 | } |
|
233 | $arrBuff = $this->powers(); |
|
234 | if (sizeof($arrBuff) > 0) { |
|
235 | $misc = $this->xml->addChild('Powers'); |
|
@@ 234-243 (lines=10) @@ | ||
231 | } |
|
232 | } |
|
233 | $arrBuff = $this->powers(); |
|
234 | if (sizeof($arrBuff) > 0) { |
|
235 | $misc = $this->xml->addChild('Powers'); |
|
236 | foreach ($arrBuff as $arrValue) { |
|
237 | $item = $misc->addChild('Item'); |
|
238 | $item->addAttribute('Label', $arrValue['label']); |
|
239 | $item->addAttribute('Value', $arrValue['value']); |
|
240 | $item->addAttribute('State', $arrValue['state']); |
|
241 | if (isset($arrValue['Max'])) $item->addAttribute('Max', $arrValue['max']); |
|
242 | } |
|
243 | } |
|
244 | $arrBuff = $this->currents(); |
|
245 | if (sizeof($arrBuff) > 0) { |
|
246 | $misc = $this->xml->addChild('Currents'); |
|
@@ 245-254 (lines=10) @@ | ||
242 | } |
|
243 | } |
|
244 | $arrBuff = $this->currents(); |
|
245 | if (sizeof($arrBuff) > 0) { |
|
246 | $misc = $this->xml->addChild('Currents'); |
|
247 | foreach ($arrBuff as $arrValue) { |
|
248 | $item = $misc->addChild('Item'); |
|
249 | $item->addAttribute('Label', $arrValue['label']); |
|
250 | $item->addAttribute('Value', $arrValue['value']); |
|
251 | $item->addAttribute('State', $arrValue['state']); |
|
252 | if (isset($arrValue['Max'])) $item->addAttribute('Max', $arrValue['max']); |
|
253 | } |
|
254 | } |
|
255 | $arrBuff = $this->misc(); |
|
256 | if (sizeof($arrBuff) > 0) { |
|
257 | $misc = $this->xml->addChild('Misc'); |
@@ 111-120 (lines=10) @@ | ||
108 | return $this->xml->getSimpleXmlElement(); |
|
109 | ||
110 | $arrBuff = $this->uprecords(); |
|
111 | if (sizeof($arrBuff) > 0) { |
|
112 | $uprecords = $this->xml->addChild("Uprecords"); |
|
113 | foreach ($arrBuff as $arrValue) { |
|
114 | $item = $uprecords->addChild('Item'); |
|
115 | $item->addAttribute('hash', $arrValue['hash']); |
|
116 | $item->addAttribute('Uptime', $arrValue['Uptime']); |
|
117 | $item->addAttribute('System', $arrValue['System']); |
|
118 | $item->addAttribute('Bootup', $arrValue['Bootup']); |
|
119 | } |
|
120 | } |
|
121 | ||
122 | return $this->xml->getSimpleXmlElement(); |
|
123 | } |