Wikibase
MediaWiki Wikibase extension
|
A service to turn term in lang IDs into terms, the inverse of TermInLangIdsAcquirer
.
More...
Public Member Functions | |
resolveTermInLangIds (array $termInLangIds, array $types=null, array $languages=null) | |
Resolves terms for the given term in lang IDs. | |
resolveGroupedTermInLangIds (array $groupedTermInLangIds, array $types=null, array $languages=null) | |
Resolves terms for the given groups of term in lang IDs. | |
A service to turn term in lang IDs into terms, the inverse of TermInLangIdsAcquirer
.
Wikibase\Lib\Store\Sql\Terms\TermInLangIdsResolver::resolveGroupedTermInLangIds | ( | array | $groupedTermInLangIds, |
array | $types = null, | ||
array | $languages = null ) |
Resolves terms for the given groups of term in lang IDs.
The input is an array of term in lang ID arrays, with arbitrary keys. The return value is an array of terms structures, with the same keys, where the values belong to the term in lang IDs corresponding to that key. One call to this method is effectively equivalent to multiple calls to resolveTermInLangIds
with the individual term in lang ID arrays, but may be more efficient than that, e.g. resolving all the term in lang IDs in one batch and then grouping them correctly afterwards.
int[][] | $groupedTermInLangIds | |
null | string[] | $types | If not null, only include results of these types |
null | string[] | $languages | If not null, only include results in these languages |
Implemented in Wikibase\Lib\Store\Sql\Terms\DatabaseTermInLangIdsResolver, and Wikibase\Lib\Store\Sql\Terms\InMemoryTermStore.
Wikibase\Lib\Store\Sql\Terms\TermInLangIdsResolver::resolveTermInLangIds | ( | array | $termInLangIds, |
array | $types = null, | ||
array | $languages = null ) |
Resolves terms for the given term in lang IDs.
Note that the information whether the leaf nodes were single strings or arrays of strings is lost: while TermInLangIdsAcquirer::acquireTermInLangIds
accepts both, this method always returns arrays of strings.
int[] | $termInLangIds | |
null | string[] | $types | If not null, only include results of these types |
null | string[] | $languages | If not null, only include results in these languages |
Implemented in Wikibase\Lib\Store\Sql\Terms\DatabaseTermInLangIdsResolver, and Wikibase\Lib\Store\Sql\Terms\InMemoryTermStore.