X-Git-Url: http://git.datanom.net/omvzfs.git/blobdiff_plain/b76f4e1734bec3862fa9326982e50386e7a6b6c1..c08a9e590d1ca6fd5d3539f1a50832dc3a1a60ef:/src/Vdev.php?ds=sidebyside diff --git a/src/Vdev.php b/src/Vdev.php index b9183d8..a5f8f9c 100644 --- a/src/Vdev.php +++ b/src/Vdev.php @@ -29,7 +29,7 @@ class OMVModuleZFSVdev { private $pool; /** - * Array holding disks + * This vdev type * * @var OMVModuleZFSVdevType $type Vdev type * @access private @@ -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; } }