Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\Sql\Terms\TypeIdsAcquirer Interface Reference

Acquires unique constant ids for stored types. More...

+ Inheritance diagram for Wikibase\Lib\Store\Sql\Terms\TypeIdsAcquirer:

Public Member Functions

 acquireTypeIds (array $types)
 Acquires ids of stored types, persisting the ones that do not exist yet.
 

Detailed Description

Acquires unique constant ids for stored types.

See also
Item & Property Terms

Member Function Documentation

◆ acquireTypeIds()

Wikibase\Lib\Store\Sql\Terms\TypeIdsAcquirer::acquireTypeIds ( array  $types)

Acquires ids of stored types, persisting the ones that do not exist yet.

Parameters
array$typeslist of types to acquire ids for
Returns
array keys in returned array are the types passed in $types associated with their acquired ids. Example: $typeIdsAcquirer->acquireTypeIds ( [ 'label', 'description' ] ) would return: [ 'label' => 100, 'description' => 121 ]

Implemented in Wikibase\Lib\Store\Sql\Terms\DatabaseTypeIdsStore, Wikibase\Lib\Store\Sql\Terms\InMemoryTypeIdsStore, and Wikibase\Lib\Store\Sql\Terms\StaticTypeIdsStore.


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