Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php |
— | — | @@ -298,13 +298,19 @@ |
299 | 299 | } |
300 | 300 | |
301 | 301 | /** |
302 | | - * A function for registering/overwriting dataitems for SMW. Should be |
303 | | - * called from within the hook 'smwInitDatatypes'. |
| 302 | + * A function for associating SMW dataitems with type IDs. This should |
| 303 | + * be called from within the hook 'smwInitDatatypes' only. |
304 | 304 | * |
305 | | - * @since 0.8 |
306 | | - * |
307 | | - * @param string $id |
308 | | - * @param string $className |
| 305 | + * The dataitem must be one of SMW's data item classes. There is no |
| 306 | + * support for adding new datat item classes to SMW. Moreover, note |
| 307 | + * that the dataitem is indirectly determined by the datavalue class of |
| 308 | + * the type ID. So both must be set/changed to be compatible. |
| 309 | + * |
| 310 | + * @todo This function should take a dataitem ID instead of a class |
| 311 | + * name to prevent new classes from being registered here. |
| 312 | + * |
| 313 | + * @param $id string |
| 314 | + * @param $className string |
309 | 315 | */ |
310 | 316 | static public function registerDataItem( $id, $className ) { |
311 | 317 | self::$mTypeDiClasses[$id] = $className; |