private function _is_cache_worthy()
    {
        $pci_good = true;
        foreach (array_keys($this->_pci_entries) as $vendor) {
            foreach (array_keys($this->_pci_entries[$vendor]) as $dever) {
                if (!isset($this->_existing_cache_vals['hw']['pci'][$vendor][$dever])) {
                    $pci_good = false;
                    break 2;
                }
            }
        }
        $usb_good = true;
        foreach (array_keys($this->_usb_entries) as $vendor) {
            foreach (array_keys($this->_usb_entries[$vendor]) as $dever) {
                if (!isset($this->_existing_cache_vals['hw']['usb'][$vendor][$dever])) {
                    $usb_good = false;
                    break 2;
                }
            }
        }

        return array('pci' => $pci_good, 'usb' => $usb_good);
    }
private function _is_cache_worthy()
    {
        $pci_good = true;
        foreach (array_keys($this->_pci_entries) as $vendor) {
            foreach (array_keys($this->_pci_entries[$vendor]) as $dever) {
                if (!isset($this->_existing_cache_vals['hw']['pci'][$vendor][$dever])) {
                    $pci_good = false;
                    break 2;
                }
            }
        }
        $usb_good = true;
        foreach (array_keys($this->_usb_entries) as $vendor) {
            foreach (array_keys($this->_usb_entries[$vendor]) as $dever) {
                if (!isset($this->_existing_cache_vals['hw']['usb'][$vendor][$dever])) {
                    $usb_good = false;
                    break 2;
                }
            }
        }

        return array('pci' => $pci_good, 'usb' => $usb_good);
    }
private function _is_cache_worthy ( ) { $ pci_good = true ; foreach ( array_keys ( $ this -> _pci_entries ) as $ vendor ) { foreach ( array_keys ( $ this -> _pci_entries [ $ vendor ] ) as $ dever ) { if ( ! isset ( $ this -> _existing_cache_vals [ 'hw' ] [ 'pci' ] [ $ vendor ] [ $ dever ] ) ) { $ pci_good = false ; break 2 ; } } } $ usb_good = true ; foreach ( array_keys ( $ this -> _usb_entries ) as $ vendor ) { foreach ( array_keys ( $ this -> _usb_entries [ $ vendor ] ) as $ dever ) { if ( ! isset ( $ this -> _existing_cache_vals [ 'hw' ] [ 'usb' ] [ $ vendor ] [ $ dever ] ) ) { $ usb_good = false ; break 2 ; } } } return array ( 'pci' => $ pci_good , 'usb' => $ usb_good ) ; }
Decide if the cache file is sufficient enough to not parse the ids files.
Decide if the cache file is sufficient enough to not parse the ids files .