Merge "startup: Update documentation"
[lhc/web/wiklou.git] / includes / db / DatabaseUtility.php
index 3923241..c1e80d3 100644 (file)
@@ -140,7 +140,7 @@ class ResultWrapper implements Iterator {
         * Fields can be retrieved with $row->fieldname, with fields acting like
         * member variables.
         *
-        * @return object
+        * @return stdClass
         * @throws DBUnexpectedError Thrown if the database returns an error
         */
        function fetchObject() {
@@ -177,8 +177,8 @@ class ResultWrapper implements Iterator {
                $this->db->dataSeek( $this, $row );
        }
 
-       /*********************
-        * Iterator functions
+       /*
+        * ======= Iterator functions =======
         * Note that using these in combination with the non-iterator functions
         * above may cause rows to be skipped or repeated.
         */
@@ -192,7 +192,7 @@ class ResultWrapper implements Iterator {
        }
 
        /**
-        * @return int
+        * @return stdClass|array|bool
         */
        function current() {
                if ( is_null( $this->currentRow ) ) {
@@ -210,7 +210,7 @@ class ResultWrapper implements Iterator {
        }
 
        /**
-        * @return int
+        * @return stdClass
         */
        function next() {
                $this->pos++;
@@ -255,6 +255,9 @@ class FakeResultWrapper extends ResultWrapper {
                return count( $this->result );
        }
 
+       /**
+        * @return array|bool
+        */
        function fetchRow() {
                if ( $this->pos < count( $this->result ) ) {
                        $this->currentRow = $this->result[$this->pos];
@@ -276,7 +279,10 @@ class FakeResultWrapper extends ResultWrapper {
        function free() {
        }
 
-       // Callers want to be able to access fields with $this->fieldName
+       /**
+        * Callers want to be able to access fields with $this->fieldName
+        * @return bool|stdClass
+        */
        function fetchObject() {
                $this->fetchRow();
                if ( $this->currentRow ) {
@@ -291,6 +297,9 @@ class FakeResultWrapper extends ResultWrapper {
                $this->currentRow = null;
        }
 
+       /**
+        * @return bool|stdClass
+        */
        function next() {
                return $this->fetchObject();
        }