r86512 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86511‎ | r86512 | r86513 >
Date:17:49, 20 April 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
added notes on registerDataItem function; this must probably be changed (including the name) before release
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php
@@ -298,13 +298,19 @@
299299 }
300300
301301 /**
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.
304304 *
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
309315 */
310316 static public function registerDataItem( $id, $className ) {
311317 self::$mTypeDiClasses[$id] = $className;

Status & tagging log