Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php |
— | — | @@ -26,6 +26,7 @@ |
27 | 27 | * @ingroup SMWQuery |
28 | 28 | */ |
29 | 29 | class SMWQueryResult { |
| 30 | + |
30 | 31 | /** |
31 | 32 | * Array of SMWWikiPageValue objects that are the basis for this result |
32 | 33 | * @var Array of SMWWikiPageValue |
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php |
— | — | @@ -191,6 +191,8 @@ |
192 | 192 | * processing -- not all DBMS might be able in seeing this by themselves. |
193 | 193 | * |
194 | 194 | * @param SMWQuery $query |
| 195 | + * |
| 196 | + * @return mixed: depends on $query->querymode |
195 | 197 | */ |
196 | 198 | public function getQueryResult( SMWQuery $query ) { |
197 | 199 | global $smwgIgnoreQueryErrors, $smwgQSortingSupport; |
— | — | @@ -276,6 +278,8 @@ |
277 | 279 | * |
278 | 280 | * @param SMWQuery $query |
279 | 281 | * @param integer $rootid |
| 282 | + * |
| 283 | + * @return string |
280 | 284 | */ |
281 | 285 | protected function getDebugQueryResult( SMWQuery $query, $rootid ) { |
282 | 286 | $qobj = $this->m_queries[$rootid]; |
— | — | @@ -331,6 +335,8 @@ |
332 | 336 | * |
333 | 337 | * @param SMWQuery $query |
334 | 338 | * @param integer $rootid |
| 339 | + * |
| 340 | + * @return integer |
335 | 341 | */ |
336 | 342 | protected function getCountQueryResult( SMWQuery $query, $rootid ) { |
337 | 343 | wfProfileIn( 'SMWSQLStore2Queries::getCountQueryResult (SMW)' ); |
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php |
— | — | @@ -215,6 +215,8 @@ |
216 | 216 | * was a usual instance retrieval query. In the case that the query asked for a plain |
217 | 217 | * string (querymode MODE_COUNT or MODE_DEBUG) a plain wiki and HTML-compatible string |
218 | 218 | * is returned. |
| 219 | + * |
| 220 | + * @return SMWQueryResult |
219 | 221 | */ |
220 | 222 | abstract function getQueryResult( SMWQuery $query ); |
221 | 223 | |
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php |
— | — | @@ -578,10 +578,10 @@ |
579 | 579 | } |
580 | 580 | |
581 | 581 | /** |
582 | | - * |
583 | | - * |
584 | 582 | * @param SMWPropertyValue $property |
585 | 583 | * @param SMWRequestOptions $requestoptions |
| 584 | + * |
| 585 | + * @return array |
586 | 586 | */ |
587 | 587 | public function getAllPropertySubjects( SMWPropertyValue $property, $requestoptions = null ) { |
588 | 588 | wfProfileIn( "SMWSQLStore2::getAllPropertySubjects (SMW)" ); |
— | — | @@ -970,6 +970,11 @@ |
971 | 971 | |
972 | 972 | ///// Query answering ///// |
973 | 973 | |
| 974 | + /** |
| 975 | + * @param $query SMWQuery |
| 976 | + * |
| 977 | + * @return mixed: depends on $query->querymode |
| 978 | + */ |
974 | 979 | function getQueryResult( SMWQuery $query ) { |
975 | 980 | wfProfileIn( 'SMWSQLStore2::getQueryResult (SMW)' ); |
976 | 981 | global $smwgIP; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | * known. Otherwise it will be determined from the parameters when |
34 | 34 | * needed. This parameter is just for optimisation in a common case. |
35 | 35 | */ |
36 | | - static public function createQuery( $querystring, $params, $context = SMWQueryProcessor::INLINE_QUERY, $format = '', $extraprintouts = array() ) { |
| 36 | + static public function createQuery( $querystring, array $params, $context = SMWQueryProcessor::INLINE_QUERY, $format = '', $extraprintouts = array() ) { |
37 | 37 | global $smwgQDefaultNamespaces, $smwgQFeatures, $smwgQConceptFeatures; |
38 | 38 | |
39 | 39 | // parse query: |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php |
— | — | @@ -234,8 +234,11 @@ |
235 | 235 | * wfLoadExtensionMessages function will no longer be needed (or supported). |
236 | 236 | * This function is used for maintaining compatibility with MediaWiki 1.15 or |
237 | 237 | * below. |
| 238 | + * |
238 | 239 | * @param string $extensionName The extension name for finding the the message |
239 | 240 | * file; same as in wfLoadExtensionMessages() |
| 241 | + * |
| 242 | + * @since 1.5.1 |
240 | 243 | */ |
241 | 244 | function smwfLoadExtensionMessages( $extensionName ) { |
242 | 245 | if ( function_exists( 'wfLoadExtensionMessages' ) ) { |
— | — | @@ -249,14 +252,21 @@ |
250 | 253 | * infrastructure allows to set up load balancing and task-dependent use of |
251 | 254 | * stores (e.g. using other stores for fast querying than for storing new |
252 | 255 | * facts), somewhat similar to MediaWiki's DB implementation. |
| 256 | + * |
| 257 | + * @return SMWStore |
253 | 258 | */ |
254 | 259 | function &smwfGetStore() { |
255 | 260 | global $smwgMasterStore, $smwgDefaultStore, $smwgIP; |
256 | | - if ( $smwgDefaultStore == 'SMWRAPStore2' ) { // no autoloading for RAP store, since autoloaded classes are in rare cases loaded by MW even if not used in code -- this is not possible for RAPstore, which depends on RAP being installed |
| 261 | + |
| 262 | + // No autoloading for RAP store, since autoloaded classes are in rare cases loaded by MW even if not used in code. |
| 263 | + // This is not possible for RAPstore, which depends on RAP being installed. |
| 264 | + if ( $smwgDefaultStore == 'SMWRAPStore2' ) { |
257 | 265 | include_once( $smwgIP . 'includes/storage/SMW_RAPStore2.php' ); |
258 | 266 | } |
| 267 | + |
259 | 268 | if ( $smwgMasterStore === null ) { |
260 | 269 | $smwgMasterStore = new $smwgDefaultStore(); |
261 | 270 | } |
| 271 | + |
262 | 272 | return $smwgMasterStore; |
263 | | -} |
| 273 | +} |
\ No newline at end of file |