Index: trunk/extensions/SemanticResultFormats/SemanticResultFormats.php |
— | — | @@ -184,3 +184,17 @@ |
185 | 185 | |
186 | 186 | return true; |
187 | 187 | } |
| 188 | + |
| 189 | +/** |
| 190 | + * Backwards compatibility helper to get the next data value from a SMWResultArray. |
| 191 | + * SMW 1.6 introduces the getNextDataValue and deprecates the getNextObject one. |
| 192 | + * |
| 193 | + * @since 1.6 |
| 194 | + * |
| 195 | + * @param SMWResultArray $resArray |
| 196 | + * |
| 197 | + * @return SMWDataValue or false |
| 198 | + */ |
| 199 | +function efSRFGetNextDV( SMWResultArray &$resArray ) { |
| 200 | + return method_exists( $resArray, 'getNextDataValue' ) ? $resArray->getNextDataValue(): $resArray->getNextObject(); |
| 201 | +} |