private function _buildNetwork()
    {
        $hideDevices = array();
        $network = $this->_xml->addChild('Network');
        if (defined('PSI_HIDE_NETWORK_INTERFACE')) {
            if (is_string(PSI_HIDE_NETWORK_INTERFACE)) {
                if (preg_match(ARRAY_EXP, PSI_HIDE_NETWORK_INTERFACE)) {
                    $hideDevices = eval(PSI_HIDE_NETWORK_INTERFACE);
                } else {
                    $hideDevices = array(PSI_HIDE_NETWORK_INTERFACE);
                }
            } elseif (PSI_HIDE_NETWORK_INTERFACE === true) {
                return;
            }
        }
        foreach ($this->_sys->getNetDevices() as $dev) {
            if (!in_array(trim($dev->getName()), $hideDevices)) {
                $device = $network->addChild('NetDevice');
                $device->addAttribute('Name', $dev->getName());
                $device->addAttribute('RxBytes', $dev->getRxBytes());
                $device->addAttribute('TxBytes', $dev->getTxBytes());
                $device->addAttribute('Err', $dev->getErrors());
                $device->addAttribute('Drops', $dev->getDrops());
                if (defined('PSI_SHOW_NETWORK_INFOS') && PSI_SHOW_NETWORK_INFOS && $dev->getInfo())
                    $device->addAttribute('Info', $dev->getInfo());
            }
        }
    }
private function _buildNetwork()
    {
        $hideDevices = array();
        $network = $this->_xml->addChild('Network');
        if (defined('PSI_HIDE_NETWORK_INTERFACE')) {
            if (is_string(PSI_HIDE_NETWORK_INTERFACE)) {
                if (preg_match(ARRAY_EXP, PSI_HIDE_NETWORK_INTERFACE)) {
                    $hideDevices = eval(PSI_HIDE_NETWORK_INTERFACE);
                } else {
                    $hideDevices = array(PSI_HIDE_NETWORK_INTERFACE);
                }
            } elseif (PSI_HIDE_NETWORK_INTERFACE === true) {
                return;
            }
        }
        foreach ($this->_sys->getNetDevices() as $dev) {
            if (!in_array(trim($dev->getName()), $hideDevices)) {
                $device = $network->addChild('NetDevice');
                $device->addAttribute('Name', $dev->getName());
                $device->addAttribute('RxBytes', $dev->getRxBytes());
                $device->addAttribute('TxBytes', $dev->getTxBytes());
                $device->addAttribute('Err', $dev->getErrors());
                $device->addAttribute('Drops', $dev->getDrops());
                if (defined('PSI_SHOW_NETWORK_INFOS') && PSI_SHOW_NETWORK_INFOS && $dev->getInfo())
                    $device->addAttribute('Info', $dev->getInfo());
            }
        }
    }
private function _buildNetwork ( ) { $ hideDevices = array ( ) ; $ network = $ this -> _xml -> addChild ( 'Network' ) ; if ( defined ( 'PSI_HIDE_NETWORK_INTERFACE' ) ) { if ( is_string ( PSI_HIDE_NETWORK_INTERFACE ) ) { if ( preg_match ( ARRAY_EXP , PSI_HIDE_NETWORK_INTERFACE ) ) { $ hideDevices = eval ( PSI_HIDE_NETWORK_INTERFACE ) ; } else { $ hideDevices = array ( PSI_HIDE_NETWORK_INTERFACE ) ; } } elseif ( PSI_HIDE_NETWORK_INTERFACE === true ) { return ; } } foreach ( $ this -> _sys -> getNetDevices ( ) as $ dev ) { if ( ! in_array ( trim ( $ dev -> getName ( ) ) , $ hideDevices ) ) { $ device = $ network -> addChild ( 'NetDevice' ) ; $ device -> addAttribute ( 'Name' , $ dev -> getName ( ) ) ; $ device -> addAttribute ( 'RxBytes' , $ dev -> getRxBytes ( ) ) ; $ device -> addAttribute ( 'TxBytes' , $ dev -> getTxBytes ( ) ) ; $ device -> addAttribute ( 'Err' , $ dev -> getErrors ( ) ) ; $ device -> addAttribute ( 'Drops' , $ dev -> getDrops ( ) ) ; if ( defined ( 'PSI_SHOW_NETWORK_INFOS' ) && PSI_SHOW_NETWORK_INFOS && $ dev -> getInfo ( ) ) $ device -> addAttribute ( 'Info' , $ dev -> getInfo ( ) ) ; } } }
generate the network information

@return void
generate the network information