X-Git-Url: http://git.datanom.net/omvzfs.git/blobdiff_plain/aa5925ead58f8a9ff47a68d4333fafaf51f47683..b71de6b53716e7c7d2670b88de09aa7db7f4e547:/src/Vdev.php diff --git a/src/Vdev.php b/src/Vdev.php index bdaab9c..a5f8f9c 100644 --- a/src/Vdev.php +++ b/src/Vdev.php @@ -45,7 +45,7 @@ class OMVModuleZFSVdev { * @throws OMVModuleZFSException */ - public function __construct($pool, OMVModuleZFSVdevType $type, array $disks) { + public function __construct($pool, $type, array $disks) { switch ($type) { case OMVModuleZFSVdevType::OMVMODULEZFSPLAIN: break; @@ -65,6 +65,8 @@ class OMVModuleZFSVdev { 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; @@ -186,7 +188,7 @@ class OMVModuleZFSVdev { * @access public */ public function getPool() { - return $pool; + return $this->pool; } /** @@ -196,7 +198,7 @@ class OMVModuleZFSVdev { * @access public */ public function getType() { - return $type; + return $this->type; } }