jenkins-bot has submitted this change and it was merged.

Change subject: Add PropertyInfoLookup
......................................................................


Add PropertyInfoLookup

This interface will be implemented by dispatching PropertyLookup
services in order to provide access to property info from
remote repositories.

Bug: T151765
Change-Id: Iaedcf99ee28265ca6c99479a30d468ef31f07341
---
A lib/includes/Store/PropertyInfoLookup.php
M lib/includes/Store/PropertyInfoStore.php
2 files changed, 55 insertions(+), 42 deletions(-)

Approvals:
  WMDE-leszek: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/includes/Store/PropertyInfoLookup.php 
b/lib/includes/Store/PropertyInfoLookup.php
new file mode 100644
index 0000000..ce81897
--- /dev/null
+++ b/lib/includes/Store/PropertyInfoLookup.php
@@ -0,0 +1,53 @@
+<?php
+
+namespace Wikibase\Lib\Store;
+
+use Wikibase\DataModel\Entity\PropertyId;
+
+/**
+ * @license GPL-2.0+
+ */
+interface PropertyInfoLookup {
+
+       /**
+        * Returns the property info for the given property ID.
+        *
+        * @note: Even if the property is known to exist, this method may not 
return
+        *        an info array, or the info array may not contain all well 
known fields.
+        *
+        * @param PropertyId $propertyId
+        *
+        * @return array|null
+        * @throws StorageException
+        * @throws DBError
+        */
+       public function getPropertyInfo( PropertyId $propertyId );
+
+       /**
+        * Returns the property info for all properties with the given data 
type.
+        *
+        * @note: There is no guarantee that an info array is returned for all 
existing properties.
+        *        Also, it is not guaranteed that the info arrays will contain 
all well known fields.
+        *
+        * @param string $dataType
+        *
+        * @return array[] An associative array mapping property IDs to info 
arrays.
+        * @throws StorageException
+        * @throws DBError
+        */
+       public function getPropertyInfoForDataType( $dataType );
+
+       /**
+        * Returns the property info for all properties.
+        * The caller is responsible for avoiding calling this if there are too 
many properties.
+        *
+        * @note: There is no guarantee that an info array is returned for all 
existing properties.
+        *        Also, it is not guaranteed that the info arrays will contain 
all well known fields.
+        *
+        * @return array[] An associative array mapping property IDs to info 
arrays.
+        * @throws StorageException
+        * @throws DBError
+        */
+       public function getAllPropertyInfo();
+
+}
diff --git a/lib/includes/Store/PropertyInfoStore.php 
b/lib/includes/Store/PropertyInfoStore.php
index 8e66917..92353e7 100644
--- a/lib/includes/Store/PropertyInfoStore.php
+++ b/lib/includes/Store/PropertyInfoStore.php
@@ -4,6 +4,7 @@
 
 use DBError;
 use Wikibase\DataModel\Entity\PropertyId;
+use Wikibase\Lib\Store\PropertyInfoLookup;
 use Wikibase\Lib\Store\StorageException;
 
 /**
@@ -11,7 +12,7 @@
  * @author Daniel Kinzler
  * @author Bene* < benestar.wikime...@gmail.com >
  */
-interface PropertyInfoStore {
+interface PropertyInfoStore extends PropertyInfoLookup {
 
        /**
         * Key to use in the info array for the property's data type ID.
@@ -22,47 +23,6 @@
         * Key to use in the info array for the property's formatter URL
         */
        const KEY_FORMATTER_URL = 'formatterURL';
-
-       /**
-        * Returns the property info for the given property ID.
-        *
-        * @note: Even if the property is known to exist, this method may not 
return
-        *        an info array, or the info array may not contain all well 
known fields.
-        *
-        * @param PropertyId $propertyId
-        *
-        * @return array|null
-        * @throws StorageException
-        * @throws DBError
-        */
-       public function getPropertyInfo( PropertyId $propertyId );
-
-       /**
-        * Returns the property info for all properties with the given data 
type.
-        *
-        * @note: There is no guarantee that an info array is returned for all 
existing properties.
-        *        Also, it is not guaranteed that the info arrays will contain 
all well known fields.
-        *
-        * @param string $dataType
-        *
-        * @return array[] An associative array mapping property IDs to info 
arrays.
-        * @throws StorageException
-        * @throws DBError
-        */
-       public function getPropertyInfoForDataType( $dataType );
-
-       /**
-        * Returns the property info for all properties.
-        * The caller is responsible for avoiding calling this if there are too 
many properties.
-        *
-        * @note: There is no guarantee that an info array is returned for all 
existing properties.
-        *        Also, it is not guaranteed that the info arrays will contain 
all well known fields.
-        *
-        * @return array[] An associative array mapping property IDs to info 
arrays.
-        * @throws StorageException
-        * @throws DBError
-        */
-       public function getAllPropertyInfo();
 
        /**
         * Update the info for the given property.

-- 
To view, visit https://gerrit.wikimedia.org/r/323844
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaedcf99ee28265ca6c99479a30d468ef31f07341
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jakob <jakob.warkot...@wikimedia.de>
Gerrit-Reviewer: Jakob <jakob.warkot...@wikimedia.de>
Gerrit-Reviewer: WMDE-leszek <leszek.mani...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to