dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "startup: Update documentation"
[lhc/web/wiklou.git]
/
includes
/
db
/
DatabaseUtility.php
diff --git
a/includes/db/DatabaseUtility.php
b/includes/db/DatabaseUtility.php
index
3923241
..
c1e80d3
100644
(file)
--- a/
includes/db/DatabaseUtility.php
+++ b/
includes/db/DatabaseUtility.php
@@
-140,7
+140,7
@@
class ResultWrapper implements Iterator {
* Fields can be retrieved with $row->fieldname, with fields acting like
* member variables.
*
* 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() {
* @throws DBUnexpectedError Thrown if the database returns an error
*/
function fetchObject() {
@@
-177,8
+177,8
@@
class ResultWrapper implements Iterator {
$this->db->dataSeek( $this, $row );
}
$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.
*/
* 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 ) ) {
*/
function current() {
if ( is_null( $this->currentRow ) ) {
@@
-210,7
+210,7
@@
class ResultWrapper implements Iterator {
}
/**
}
/**
- * @return
int
+ * @return
stdClass
*/
function next() {
$this->pos++;
*/
function next() {
$this->pos++;
@@
-255,6
+255,9
@@
class FakeResultWrapper extends ResultWrapper {
return count( $this->result );
}
return count( $this->result );
}
+ /**
+ * @return array|bool
+ */
function fetchRow() {
if ( $this->pos < count( $this->result ) ) {
$this->currentRow = $this->result[$this->pos];
function fetchRow() {
if ( $this->pos < count( $this->result ) ) {
$this->currentRow = $this->result[$this->pos];
@@
-276,7
+279,10
@@
class FakeResultWrapper extends ResultWrapper {
function free() {
}
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 ) {
function fetchObject() {
$this->fetchRow();
if ( $this->currentRow ) {
@@
-291,6
+297,9
@@
class FakeResultWrapper extends ResultWrapper {
$this->currentRow = null;
}
$this->currentRow = null;
}
+ /**
+ * @return bool|stdClass
+ */
function next() {
return $this->fetchObject();
}
function next() {
return $this->fetchObject();
}