r111951 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111950‎ | r111951 | r111952 >
Date:18:43, 20 February 2012
Author:foxtrott
Status:ok
Tags:
Comment:
reset method for result arrays
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_ResultArray.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_ResultArray.php
@@ -113,6 +113,19 @@
114114 return $result;
115115 }
116116
 117+ /**
 118+ * Set the internal pointer of the array of SMWDataItem objects to its first
 119+ * element. Return the first SMWDataItem object or false if the array is
 120+ * empty.
 121+ *
 122+ * @since 1.7.1
 123+ *
 124+ * @return SMWDataItem or false
 125+ */
 126+ public function reset() {
 127+ $this->loadContent();
 128+ return reset( $this->mContent );
 129+ }
117130
118131 /**
119132 * Return an SMWDataValue object for the next SMWDataItem object or

Sign-offs

UserFlagDate
Nikerabbitinspected07:51, 21 February 2012

Status & tagging log