Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\Store\PropertyInfoLookup Interface Reference
+ Inheritance diagram for Wikibase\Lib\Store\PropertyInfoLookup:

Public Member Functions

 getPropertyInfo (PropertyId $propertyId)
 Returns the property info for the given property ID. More...
 
 getPropertyInfoForDataType ( $dataType)
 Returns the property info for all properties with the given data type. More...
 
 getAllPropertyInfo ()
 Returns the property info for all properties. More...
 

Public Attributes

const KEY_DATA_TYPE = 'type'
 Key to use in the info array for the property's data type ID. More...
 
const KEY_FORMATTER_URL = 'formatterURL'
 Key to use in the info array for the property's formatter URL. More...
 

Detailed Description

Member Function Documentation

◆ getAllPropertyInfo()

Wikibase\Lib\Store\PropertyInfoLookup::getAllPropertyInfo ( )

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.
Returns
array[] An associative array mapping property IDs to info arrays.
Exceptions
StorageException
DBError

Implemented in Wikibase\Lib\Store\Sql\PropertyInfoTable, and Wikibase\Lib\Store\CachingPropertyInfoLookup.

◆ getPropertyInfo()

Wikibase\Lib\Store\PropertyInfoLookup::getPropertyInfo ( PropertyId  $propertyId)

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.
Parameters
PropertyId$propertyId
Returns
array|null
Exceptions
StorageException
DBError

Implemented in Wikibase\Lib\Store\Sql\PropertyInfoTable, and Wikibase\Lib\Store\CachingPropertyInfoLookup.

◆ getPropertyInfoForDataType()

Wikibase\Lib\Store\PropertyInfoLookup::getPropertyInfoForDataType (   $dataType)

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.
Parameters
string$dataType
Returns
array[] An associative array mapping property IDs to info arrays.
Exceptions
StorageException
DBError

Implemented in Wikibase\Lib\Store\Sql\PropertyInfoTable, and Wikibase\Lib\Store\CachingPropertyInfoLookup.

Member Data Documentation

◆ KEY_DATA_TYPE

const Wikibase\Lib\Store\PropertyInfoLookup::KEY_DATA_TYPE = 'type'

Key to use in the info array for the property's data type ID.

◆ KEY_FORMATTER_URL

const Wikibase\Lib\Store\PropertyInfoLookup::KEY_FORMATTER_URL = 'formatterURL'

Key to use in the info array for the property's formatter URL.


The documentation for this interface was generated from the following file: