From 8c2944eca424e9116455551293e343eaa4cda9e6 Mon Sep 17 00:00:00 2001 From: Niclas Berglind Date: Sat, 5 Apr 2014 00:14:41 +0200 Subject: [PATCH] Added getSnapshots method to Zvol class. Signed-off-by: Niclas Berglind --- src/Zvol.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Zvol.php b/src/Zvol.php index fb86eeb..e35af5a 100644 --- a/src/Zvol.php +++ b/src/Zvol.php @@ -121,6 +121,20 @@ class OMVModuleZFSZvol { return $this->size; } + /** + * Get all Snapshots associated with the Zvol + * + * @return array $snapshots + * @access public + */ + public function getSnapshots() { + if (isset($this->snapshots)) { + return $this->snapshots; + } else { + return array(); + } + } + /** * Sets a number of Zvol properties. If a property is already set it will be updated with the new value. * -- 2.39.2