private $pool;
/**
- * Array holding disks
+ * This vdev type
*
* @var OMVModuleZFSVdevType $type Vdev type
* @access private
* Constructor
*
* @param $pool pool this mirror belongs to
+ * @throws OMVModuleZFSException
*/
- public function __construct($pool, OMVModuleZFSVdevType $type, array $disks) {
+ public function __construct($pool, $type, array $disks) {
switch ($type) {
case OMVModuleZFSVdevType::OMVMODULEZFSPLAIN:
break;
if (count($disks) < 5)
throw new OMVModuleZFSException("A Raidz3 must contain at least 5 disks");
break;
+ default:
+ throw new OMVModuleZFSException("$type: Unknown zpool type");
}
$this->pool = $pool;
$this->disks = $disks;
* @access public
*/
public function getPool() {
- return $pool;
+ return $this->pool;
+ }
+
+ /**
+ * Get type
+ *
+ * @return OMVModuleZFSVdevType
+ * @access public
+ */
+ public function getType() {
+ return $this->type;
}
}