Line 25... |
Line 25... |
25 |
* fill the private content var
|
25 |
* fill the private content var
|
26 |
*/
|
26 |
*/
|
27 |
public function __construct()
|
27 |
public function __construct()
|
28 |
{
|
28 |
{
|
29 |
parent::__construct();
|
29 |
parent::__construct();
|
30 |
if ((PSI_OS == 'WINNT') || defined('PSI_EMU_HOSTNAME')) {
|
30 |
if ((PSI_OS == 'WINNT') || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
|
31 |
$_wmi = WINNT::initWMI('root\OpenHardwareMonitor', true);
|
31 |
$_wmi = WINNT::initWMI('root\OpenHardwareMonitor', true);
|
32 |
if ($_wmi) {
|
32 |
if ($_wmi) {
|
33 |
$tmpbuf = WINNT::getWMI($_wmi, 'Sensor', array('Parent', 'Name', 'SensorType', 'Value'));
|
33 |
$tmpbuf = WINNT::getWMI($_wmi, 'Sensor', array('Parent', 'Name', 'SensorType', 'Value'));
|
34 |
if ($tmpbuf) foreach ($tmpbuf as $buffer) {
|
34 |
if ($tmpbuf) foreach ($tmpbuf as $buffer) {
|
35 |
if (!isset($this->_buf[$buffer['SensorType']]) || !isset($this->_buf[$buffer['SensorType']][$buffer['Parent'].' '.$buffer['Name']])) { // avoid duplicates
|
35 |
if (!isset($this->_buf[$buffer['SensorType']]) || !isset($this->_buf[$buffer['SensorType']][$buffer['Parent'].' '.$buffer['Name']])) { // avoid duplicates
|