private function getScsi(): array
	{
		$get_type = false;
		$device = null;
		$scsi = [];
		$data = $this->readFile('/proc/scsi/scsi');

		if ($data !== null) {
			$bufe = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
			foreach ($bufe as $buf) {
				if (preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $devices)) {
					$get_type = true;
					$device = $devices;
					continue;
				}
				if ($get_type) {
					preg_match('/Type:\s+(\S+)/i', $buf, $dev_type);
					$dev = new Obj;
					$dev->name = trim($device[1]) . ' ' . trim($device[2]);
					$dev->type = trim($dev_type[1]);
					$scsi[] = $dev;
					$get_type = false;
				}
			}
		}
		return $scsi;
	}
private function getScsi(): array
	{
		$get_type = false;
		$device = null;
		$scsi = [];
		$data = $this->readFile('/proc/scsi/scsi');

		if ($data !== null) {
			$bufe = preg_split("/\n/", $data, -1, PREG_SPLIT_NO_EMPTY);
			foreach ($bufe as $buf) {
				if (preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $devices)) {
					$get_type = true;
					$device = $devices;
					continue;
				}
				if ($get_type) {
					preg_match('/Type:\s+(\S+)/i', $buf, $dev_type);
					$dev = new Obj;
					$dev->name = trim($device[1]) . ' ' . trim($device[2]);
					$dev->type = trim($dev_type[1]);
					$scsi[] = $dev;
					$get_type = false;
				}
			}
		}
		return $scsi;
	}
private function getScsi ( ) : array { $ get_type = false ; $ device = null ; $ scsi = [ ] ; $ data = $ this -> readFile ( '/proc/scsi/scsi' ) ; if ( $ data !== null ) { $ bufe = preg_split ( "/\n/" , $ data , - 1 , PREG_SPLIT_NO_EMPTY ) ; foreach ( $ bufe as $ buf ) { if ( preg_match ( '/Vendor: (.*) Model: (.*) Rev: (.*)/i' , $ buf , $ devices ) ) { $ get_type = true ; $ device = $ devices ; continue ; } if ( $ get_type ) { preg_match ( '/Type:\s+(\S+)/i' , $ buf , $ dev_type ) ; $ dev = new Obj ; $ dev -> name = trim ( $ device [ 1 ] ) . ' ' . trim ( $ device [ 2 ] ) ; $ dev -> type = trim ( $ dev_type [ 1 ] ) ; $ scsi [ ] = $ dev ; $ get_type = false ; } } } return $ scsi ; }
Vrati informace o scsi
@return Obj[]
Vrati informace o scsi