* Mon May 12 2025 Brian Read <brianr@koozali.org> 11.0.0-1.sme
- Adding SM2 panel [SME: 13004] - Upgrade to phpsysinfo 3.4.4 - Add code to delete inline styles and add css to make it look better. - version saved / built uses the static version, which means no drops downs and choices.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* @package PSI_TO
|
||||
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
||||
* @copyright 2009 phpSysInfo
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
|
||||
* @version SVN: $Id: class.HWDevice.inc.php 255 2009-06-17 13:39:41Z bigmichi1 $
|
||||
* @link http://phpsysinfo.sourceforge.net
|
||||
*/
|
||||
@@ -19,7 +19,7 @@
|
||||
* @package PSI_TO
|
||||
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
||||
* @copyright 2009 phpSysInfo
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
|
||||
* @version Release: 3.0
|
||||
* @link http://phpsysinfo.sourceforge.net
|
||||
*/
|
||||
@@ -28,21 +28,56 @@ class HWDevice
|
||||
/**
|
||||
* name of the device
|
||||
*
|
||||
* @var String
|
||||
* @var string
|
||||
*/
|
||||
private $_name = "";
|
||||
|
||||
/**
|
||||
* capacity of the device, if not available it will be null
|
||||
*
|
||||
* @var Integer
|
||||
* @var int
|
||||
*/
|
||||
private $_capacity = null;
|
||||
|
||||
/**
|
||||
* manufacturer of the device, if not available it will be null
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $_manufacturer = null;
|
||||
|
||||
/**
|
||||
* product of the device, if not available it will be null
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $_product = null;
|
||||
|
||||
/**
|
||||
* serial number of the device, if not available it will be null
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_serial = null;
|
||||
|
||||
/**
|
||||
* speed of the device, if not available it will be null
|
||||
*
|
||||
* @var Float
|
||||
*/
|
||||
private $_speed = null;
|
||||
|
||||
/**
|
||||
* voltage of the device, if not available it will be null
|
||||
*
|
||||
* @var Float
|
||||
*/
|
||||
private $_voltage = null;
|
||||
|
||||
/**
|
||||
* count of the device
|
||||
*
|
||||
* @var Integer
|
||||
* @var int
|
||||
*/
|
||||
private $_count = 1;
|
||||
|
||||
@@ -55,39 +90,18 @@ class HWDevice
|
||||
*/
|
||||
public function equals(HWDevice $dev)
|
||||
{
|
||||
if ($dev->getName() === $this->_name && $dev->getCapacity() === $this->_capacity) {
|
||||
if ($dev->getName() === $this->_name
|
||||
&& $dev->getCapacity() === $this->_capacity
|
||||
&& $dev->getManufacturer() === $this->_manufacturer
|
||||
&& $dev->getProduct() === $this->_product
|
||||
&& $dev->getSerial() === $this->_serial
|
||||
&& $dev->getSpeed() === $this->_speed) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns $_capacity.
|
||||
*
|
||||
* @see HWDevice::$_capacity
|
||||
*
|
||||
* @return Integer
|
||||
*/
|
||||
public function getCapacity()
|
||||
{
|
||||
return $this->_capacity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $_capacity.
|
||||
*
|
||||
* @param Integer $capacity device capacity
|
||||
*
|
||||
* @see HWDevice::$_capacity
|
||||
*
|
||||
* @return Void
|
||||
*/
|
||||
public function setCapacity($capacity)
|
||||
{
|
||||
$this->_capacity = $capacity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns $_name.
|
||||
*
|
||||
@@ -107,19 +121,175 @@ class HWDevice
|
||||
*
|
||||
* @see HWDevice::$_name
|
||||
*
|
||||
* @return Void
|
||||
* @return void
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->_name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns $_manufacturer.
|
||||
*
|
||||
* @see HWDevice::$_manufacturer
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public function getManufacturer()
|
||||
{
|
||||
return $this->_manufacturer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $_manufacturer.
|
||||
*
|
||||
* @param String $manufacturer manufacturer name
|
||||
*
|
||||
* @see HWDevice::$_manufacturer
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setManufacturer($manufacturer)
|
||||
{
|
||||
$this->_manufacturer = $manufacturer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns $_product.
|
||||
*
|
||||
* @see HWDevice::$_product
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public function getProduct()
|
||||
{
|
||||
return $this->_product;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $_product.
|
||||
*
|
||||
* @param String $product product name
|
||||
*
|
||||
* @see HWDevice::$_product
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setProduct($product)
|
||||
{
|
||||
$this->_product = $product;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns $_serial.
|
||||
*
|
||||
* @see HWDevice::$_serial
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public function getSerial()
|
||||
{
|
||||
return $this->_serial;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $_serial.
|
||||
*
|
||||
* @param String $serial serial number
|
||||
*
|
||||
* @see HWDevice::$_serial
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setSerial($serial)
|
||||
{
|
||||
$this->_serial = $serial;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns $_speed.
|
||||
*
|
||||
* @see HWDevice::$_speed
|
||||
*
|
||||
* @return Float
|
||||
*/
|
||||
public function getSpeed()
|
||||
{
|
||||
return $this->_speed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $_speed.
|
||||
*
|
||||
* @param Float $speed speed
|
||||
*
|
||||
* @see HWDevice::$_speed
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setSpeed($speed)
|
||||
{
|
||||
$this->_speed = $speed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns $_voltage.
|
||||
*
|
||||
* @see HWDevice::$_voltage
|
||||
*
|
||||
* @return Float
|
||||
*/
|
||||
public function getVoltage()
|
||||
{
|
||||
return $this->_voltage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $_voltage.
|
||||
*
|
||||
* @param Float $voltage voltage
|
||||
*
|
||||
* @see HWDevice::$_voltage
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setVoltage($voltage)
|
||||
{
|
||||
$this->_voltage = $voltage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns $_capacity.
|
||||
*
|
||||
* @see HWDevice::$_capacity
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getCapacity()
|
||||
{
|
||||
return $this->_capacity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $_capacity.
|
||||
*
|
||||
* @param int $capacity device capacity
|
||||
*
|
||||
* @see HWDevice::$_capacity
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setCapacity($capacity)
|
||||
{
|
||||
$this->_capacity = $capacity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns $_count.
|
||||
*
|
||||
* @see HWDevice::$_count
|
||||
*
|
||||
* @return Integer
|
||||
* @return int
|
||||
*/
|
||||
public function getCount()
|
||||
{
|
||||
@@ -129,11 +299,11 @@ class HWDevice
|
||||
/**
|
||||
* Sets $_count.
|
||||
*
|
||||
* @param Integer $count device count
|
||||
* @param int $count device count
|
||||
*
|
||||
* @see HWDevice::$_count
|
||||
*
|
||||
* @return Void
|
||||
* @return void
|
||||
*/
|
||||
public function setCount($count)
|
||||
{
|
||||
|
Reference in New Issue
Block a user