Jeroen De Dauw has uploaded a new change for review.
https://gerrit.wikimedia.org/r/75851
Change subject: Add getDataValueFactory to top level factory
......................................................................
Add getDataValueFactory to top level factory
Change-Id: I9a8491d4b7ef81e80facabb54c96db28b8c5d813
---
M repo/includes/WikibaseRepo.php
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/51/75851/1
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index d233832..886a77e 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -3,6 +3,7 @@
namespace Wikibase\Repo;
use DataTypes\DataTypeFactory;
+use DataValues\DataValueFactory;
use ValueFormatters\FormatterOptions;
use ValueParsers\ParserOptions;
use Wikibase\EntityContentFactory;
@@ -126,6 +127,21 @@
/**
* @since 0.4
*
+ * @return DataValueFactory
+ */
+ public function getDataValueFactory() {
+ $dataValueFactory = new DataValueFactory();
+
+ foreach ( $GLOBALS['wgDataValues'] as $type => $class ) {
+ $dataValueFactory->registerDataValue( $type, $class );
+ }
+
+ return $dataValueFactory;
+ }
+
+ /**
+ * @since 0.4
+ *
* @return EntityContentFactory
*/
public function getEntityContentFactory() {
--
To view, visit https://gerrit.wikimedia.org/r/75851
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a8491d4b7ef81e80facabb54c96db28b8c5d813
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits