]> git.datanom.net - omvzfs.git/blobdiff - src/Zvol.php
Added a couple of get methods to the Zvol class.
[omvzfs.git] / src / Zvol.php
index 5c07ebb427d1ba9cc920c43f4d8a78b4bc35e4a7..a26224113bd1491d1ae4d47f4bcdefd414ca0f44 100644 (file)
@@ -44,43 +44,58 @@ class OMVModuleZFSZvol {
 
        // Associations
        // Operations
+       
        /**
-        * XXX
-        *
-        * @return string XXX
+        * Return name of the Zvol
+        * 
+        * @return string $name
         * @access public
         */
        public function getName() {
-               trigger_error('Not Implemented!', E_USER_WARNING);
+               return $this->name;
        }
 
        /**
-        * XXX
-        *
-        * @return int XXX
+        * Get the mountpoint of the Zvol
+        * 
+        * @return string $mountPoint
         * @access public
         */
-       public function getSize() {
-               trigger_error('Not Implemented!', E_USER_WARNING);
+       public function getMountPoint() {
+               return $this->mountPoint;
        }
 
        /**
-        * XXX
-        *
-        * @return string XXX
+        * Get a single property value associated with the Zvol
+        * 
+        * @param string $property Name of the property to fetch
+        * @return array The returned array with the property. The property is an associative array with
+        * two elements, <value> and <source>.
         * @access public
         */
-       public function getMountPoint() {
-               trigger_error('Not Implemented!', E_USER_WARNING);
+       public function getProperty($property) {
+               return $this->properties["$property"];
+       }
+
+       /**
+        * Get an associative array of all properties associated with the Zvol
+        * 
+        * @return array $properties Each entry is an associative array with two elements
+        * <value> and <source>
+        * @access public
+        */
+       public function getProperties() {
+               return $this->properties;
        }
 
+
        /**
         * XXX
         *
-        * @return list<Feature> XXX
+        * @return int XXX
         * @access public
         */
-       public function getProperties() {
+       public function getSize() {
                trigger_error('Not Implemented!', E_USER_WARNING);
        }
 
This page took 0.048836 seconds and 5 git commands to generate.