public function getDevs()
    {
        // Time?
        if (!empty($this->settings['timer'])) {
            $t = new Timer('Hardware Devices');
        }

        // Match them
        if (preg_match_all('/([a-z]+\d+) at ([a-z]+)\d*.+ "(.+)"/m', $this->dmesg, $devices_match, PREG_SET_ORDER) == 0) {
            return [];
        }

        // Store them here
        $devices = [];

        // Stuff them
        foreach ($devices_match as $match) {
            $type = strtoupper($match[2]);

            $devices[] = array(
                'vendor' => false, // hmm
                'device' => $match[3],
                'type' => $type,

            );
        }

        // Give them
        return $devices;
    }
public function getDevs()
    {
        // Time?
        if (!empty($this->settings['timer'])) {
            $t = new Timer('Hardware Devices');
        }

        // Match them
        if (preg_match_all('/([a-z]+\d+) at ([a-z]+)\d*.+ "(.+)"/m', $this->dmesg, $devices_match, PREG_SET_ORDER) == 0) {
            return [];
        }

        // Store them here
        $devices = [];

        // Stuff them
        foreach ($devices_match as $match) {
            $type = strtoupper($match[2]);

            $devices[] = array(
                'vendor' => false, // hmm
                'device' => $match[3],
                'type' => $type,

            );
        }

        // Give them
        return $devices;
    }
public function getDevs ( ) { // Time? if ( ! empty ( $ this -> settings [ 'timer' ] ) ) { $ t = new Timer ( 'Hardware Devices' ) ; } // Match them if ( preg_match_all ( '/([a-z]+\d+) at ([a-z]+)\d*.+ "(.+)"/m' , $ this -> dmesg , $ devices_match , PREG_SET_ORDER ) == 0 ) { return [ ] ; } // Store them here $ devices = [ ] ; // Stuff them foreach ( $ devices_match as $ match ) { $ type = strtoupper ( $ match [ 2 ] ) ; $ devices [ ] = array ( 'vendor' => false , // hmm 'device' => $ match [ 3 ] , 'type' => $ type , ) ; } // Give them return $ devices ; }
Get hardware devices
Get hardware devices