Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup Class Reference

PropertyDataTypeLookup that uses an in memory array to retrieve the requested information. More...

+ Inheritance diagram for Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup:
+ Collaboration diagram for Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup:

Public Member Functions

 getDataTypeIdForProperty (PropertyId $propertyId)
 
 setDataTypeForProperty (PropertyId $propertyId, $dataTypeId)
 

Private Member Functions

 verifyDataTypeIsSet (PropertyId $propertyId)
 
 verifyDataTypeIdType ( $dataTypeId)
 

Private Attributes

 $dataTypeIds = []
 

Detailed Description

PropertyDataTypeLookup that uses an in memory array to retrieve the requested information.

If the information is not set when requested an exception is thrown. This class can be used as a fake in tests.

Since
1.0
Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Member Function Documentation

◆ getDataTypeIdForProperty()

Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup::getDataTypeIdForProperty ( PropertyId $propertyId)
Parameters
PropertyId$propertyId
Returns
string
Exceptions
PropertyDataTypeLookupException

Implements Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookup.

◆ setDataTypeForProperty()

Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup::setDataTypeForProperty ( PropertyId $propertyId,
$dataTypeId )
Since
1.0
Parameters
PropertyId$propertyId
string$dataTypeId
Exceptions
InvalidArgumentException

◆ verifyDataTypeIdType()

Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup::verifyDataTypeIdType ( $dataTypeId)
private
Parameters
string$dataTypeId
Exceptions
InvalidArgumentException

◆ verifyDataTypeIsSet()

Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup::verifyDataTypeIsSet ( PropertyId $propertyId)
private
Parameters
PropertyId$propertyId
Exceptions
PropertyDataTypeLookupException

Member Data Documentation

◆ $dataTypeIds

Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup::$dataTypeIds = []
private

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