Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_ResultArray.php |
— | — | @@ -113,6 +113,19 @@ |
114 | 114 | return $result; |
115 | 115 | } |
116 | 116 | |
| 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 | + } |
117 | 130 | |
118 | 131 | /** |
119 | 132 | * Return an SMWDataValue object for the next SMWDataItem object or |