/** * Set information of the node. * * @return void * @access private */ private function _setInfo() { $this->_status = -1; if (!$this->_url) { return; } $turl = $this->_url . '/inform'; $reqheads = array(); $res = Services_HyperEstraier_Utility::shuttleUrl($turl, $this->_auth, $this->_pxhost, $this->_pxport, $this->_timeout, $reqheads, null, $res); if (!$res) { return; } $this->_status = $res->getResponseCode(); if ($res->isError()) { return; } $lines = explode("\n", $res->getResponseBody()); if (count($lines) == 0) { return; } $elems = explode("\t", $lines[0]); if (count($elems) != 5) { return; } $this->_name = $elems[0]; $this->_label = $elems[1]; $this->_dnum = intval($elems[2]); $this->_wnum = intval($elems[3]); $this->_size = floatval($elems[4]); $llen = count($lines); if ($llen < 2) { return; } $lnum = 1; if ($lnum < $llen && strlen($lines[$lnum]) < 1) { $lnum++; } $this->_admins = array(); while ($lnum < $llen) { $line = $lines[$lnum]; if (strlen($line) < 1) { break; } $this->_admins[] = $line; $lnum++; } if ($lnum < $llen && strlen($lines[$lnum]) < 1) { $lnum++; } $this->_users = array(); while ($lnum < $llen) { $line = $lines[$lnum]; if (strlen($line) < 1) { break; } $this->_users[] = $line; $lnum++; } if ($lnum < $llen && strlen($lines[$lnum]) < 1) { $lnum++; } $this->_links = array(); while ($lnum < $llen) { $line = $lines[$lnum]; if (strlen($line) < 1) { break; } $links = explode($line); if (count($links) == 3) { $this->_links[] = $links; } $lnum++; } }