Daniel Kinzler has uploaded a new change for review.
https://gerrit.wikimedia.org/r/56319
Change subject: Rename PropertySQLLookup to PropertyEntityLookup.
......................................................................
Rename PropertySQLLookup to PropertyEntityLookup.
The implementation is based on looking up property entities using an
EntityLookup, so the name seemed appropriate, if a bit odd.
Change-Id: I0b3927972344c3025df134be702fdd9434eb27b6
---
M client/includes/store/sql/CachingSqlStore.php
M client/includes/store/sql/DirectSqlStore.php
M lib/WikibaseLib.hooks.php
M lib/WikibaseLib.php
R lib/includes/store/sql/PropertyEntityLookup.php
R lib/tests/phpunit/store/PropertyEntityLookupTest.php
6 files changed, 14 insertions(+), 14 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/19/56319/1
diff --git a/client/includes/store/sql/CachingSqlStore.php
b/client/includes/store/sql/CachingSqlStore.php
index ef44884..6cfb919 100644
--- a/client/includes/store/sql/CachingSqlStore.php
+++ b/client/includes/store/sql/CachingSqlStore.php
@@ -115,7 +115,7 @@
protected function newPropertyLookup() {
$entityLookup = $this->getEntityLookup();
- return new PropertySQLLookup( $entityLookup );
+ return new PropertyEntityLookup( $entityLookup );
}
/**
diff --git a/client/includes/store/sql/DirectSqlStore.php
b/client/includes/store/sql/DirectSqlStore.php
index 4c184f9..77cfea0 100644
--- a/client/includes/store/sql/DirectSqlStore.php
+++ b/client/includes/store/sql/DirectSqlStore.php
@@ -115,7 +115,7 @@
protected function newPropertyLookup() {
$entityLookup = $this->getEntityLookup();
- return new PropertySQLLookup( $entityLookup );
+ return new PropertyEntityLookup( $entityLookup );
}
/**
diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 9512505..9e91345 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -63,7 +63,7 @@
'store/WikiPageEntityLookup',
'store/CachingEntityLoader',
- 'store/sql/PropertySQLLookup',
+ 'store/PropertyEntityLookup',
'ByPropertyIdArray',
'ChangesTable',
diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index a2f522c..859cb92 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -193,7 +193,7 @@
// includes/store/sql
$wgAutoloadClasses['Wikibase\CachingEntityLoader'] = $dir .
'includes/store/sql/CachingEntityLoader.php';
-$wgAutoloadClasses['Wikibase\PropertySQLLookup'] = $dir .
'includes/store/sql/PropertySQLLookup.php';
+$wgAutoloadClasses['Wikibase\PropertyEntityLookup'] = $dir .
'includes/store/sql/PropertyEntityLookup.php';
$wgAutoloadClasses['Wikibase\SiteLinkTable'] = $dir .
'includes/store/sql/SiteLinkTable.php';
$wgAutoloadClasses['Wikibase\WikiPageEntityLookup'] = $dir .
'includes/store/sql/WikiPageEntityLookup.php';
diff --git a/lib/includes/store/sql/PropertySQLLookup.php
b/lib/includes/store/sql/PropertyEntityLookup.php
similarity index 96%
rename from lib/includes/store/sql/PropertySQLLookup.php
rename to lib/includes/store/sql/PropertyEntityLookup.php
index 63128f3..e832c04 100644
--- a/lib/includes/store/sql/PropertySQLLookup.php
+++ b/lib/includes/store/sql/PropertyEntityLookup.php
@@ -3,9 +3,9 @@
namespace Wikibase;
/**
- * Property lookup by id and label
+ * Implementation of PropertyLookup based on an EntityLookup
*
- * @todo use terms table to do lookups, add caching and tests
+ * @todo add caching
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
* @author Katie Filbert < [email protected] >
* @author Daniel Kinzler
*/
-class PropertySQLLookup implements PropertyLookup {
+class PropertyEntityLookup implements PropertyLookup {
/* @var WikiPageEntityLookup */
protected $entityLookup;
diff --git a/lib/tests/phpunit/store/sql/PropertySQLLookupTest.php
b/lib/tests/phpunit/store/PropertyEntityLookupTest.php
similarity index 93%
rename from lib/tests/phpunit/store/sql/PropertySQLLookupTest.php
rename to lib/tests/phpunit/store/PropertyEntityLookupTest.php
index ab67677..d45c53d 100644
--- a/lib/tests/phpunit/store/sql/PropertySQLLookupTest.php
+++ b/lib/tests/phpunit/store/PropertyEntityLookupTest.php
@@ -1,7 +1,7 @@
<?php
namespace Wikibase\Test;
-use Wikibase\PropertySQLLookup;
+use Wikibase\PropertyEntityLookup;
use Wikibase\EntityFactory;
use Wikibase\EntityId;
use Wikibase\Property;
@@ -12,7 +12,7 @@
use DataValues\StringValue;
/**
- * Tests for the Wikibase\PropertySQLLookup class.
+ * Tests for the Wikibase\PropertyEntityLookup class.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@
* @author Katie Filbert < [email protected] >
* @author Daniel Kinzler
*/
-class PropertySQLLookupTest extends \MediaWikiTestCase {
+class PropertyEntityLookupTest extends \MediaWikiTestCase {
/**
* @var \Wikibase\EntityLookup
@@ -50,7 +50,7 @@
protected $entityLookup;
/**
- * @var \Wikibase\PropertySQLLookup
+ * @var \Wikibase\PropertyEntityLookup
*/
protected $propertyLookup;
@@ -176,12 +176,12 @@
$this->entityLookup->putEntity( $item );
}
- $this->propertyLookup = new PropertySQLLookup(
$this->entityLookup );
+ $this->propertyLookup = new PropertyEntityLookup(
$this->entityLookup );
}
public function testConstructor() {
- $instance = new PropertySQLLookup( $this->entityLookup );
- $this->assertInstanceOf( '\Wikibase\PropertySQLLookup',
$instance );
+ $instance = new PropertyEntityLookup( $this->entityLookup );
+ $this->assertInstanceOf( '\Wikibase\PropertyEntityLookup',
$instance );
}
public function getMainSnaksByPropertyLabelProvider() {
--
To view, visit https://gerrit.wikimedia.org/r/56319
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b3927972344c3025df134be702fdd9434eb27b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits