Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor Class Reference
+ Inheritance diagram for Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor:
+ Collaboration diagram for Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor:

Public Member Functions

 __construct (MatchingTermsLookup $matchingTermsLookup, LanguageFallbackChainFactory $fallbackFactory, PrefetchingTermLookup $bufferingTermLookup, $displayLanguageCode)
 
 setTermSearchOptions (TermSearchOptions $termSearchOptions)
 
 searchForEntities ( $text, $languageCode, $entityType, array $termTypes)
 

Private Member Functions

 getMatchingTermIndexEntries ( $text, $languageCode, $entityType, array $termTypes)
 
 getMatchedEntityIdSerializations (array $matchedTermIndexEntries)
 
 getFallbackMatchedTermIndexEntries ( $text, array $languageCodes, $termTypes, $entityType, array $matchedEntityIdSerializations)
 
 getSearchResults (array $termIndexEntries)
 
 preFetchLabelsAndDescriptionsForDisplay (array $entityIds)
 
 getEntityIdsForTermIndexEntries (array $termsIndexEntries)
 
 convertToSearchResult (TermIndexEntry $termIndexEntry)
 
 getTermIndexOptions ()
 
 addFallbackLanguageCodes (array $languageCodes)
 
 getLabelDisplayTerm (EntityId $entityId)
 
 getDescriptionDisplayTerm (EntityId $entityId)
 
 makeTermIndexSearchCriteria ( $text, array $languageCodes, array $termTypes)
 

Private Attributes

 $matchingTermsLookup
 
 $languageFallbackChainFactory
 
 $bufferingTermLookup
 
 $labelDescriptionLookup
 
 $displayLanguageCode
 
 $termSearchOptions
 

Detailed Description

Author
Addshore

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::__construct ( MatchingTermsLookup  $matchingTermsLookup,
LanguageFallbackChainFactory  $fallbackFactory,
PrefetchingTermLookup  $bufferingTermLookup,
  $displayLanguageCode 
)
Parameters
MatchingTermsLookup$matchingTermsLookupUsed to search the terms
LanguageFallbackChainFactory$fallbackFactory
PrefetchingTermLookup$bufferingTermLookupProvides the displayTerms
string$displayLanguageCode

Member Function Documentation

◆ addFallbackLanguageCodes()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::addFallbackLanguageCodes ( array  $languageCodes)
private
Parameters
string[]$languageCodes
Returns
string[]

◆ convertToSearchResult()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::convertToSearchResult ( TermIndexEntry  $termIndexEntry)
private
Parameters
TermIndexEntry$termIndexEntry
Returns
TermSearchResult

◆ getDescriptionDisplayTerm()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::getDescriptionDisplayTerm ( EntityId  $entityId)
private
Parameters
EntityId$entityId
Returns
null|Term

◆ getEntityIdsForTermIndexEntries()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::getEntityIdsForTermIndexEntries ( array  $termsIndexEntries)
private
Parameters
TermIndexEntry[]$termsIndexEntries
Returns
EntityId[]

◆ getFallbackMatchedTermIndexEntries()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::getFallbackMatchedTermIndexEntries (   $text,
array  $languageCodes,
  $termTypes,
  $entityType,
array  $matchedEntityIdSerializations 
)
private
Parameters
string$text
string[]$languageCodes
string[]$termTypes
string$entityType
string[]$matchedEntityIdSerializations
Returns
TermIndexEntry[]

◆ getLabelDisplayTerm()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::getLabelDisplayTerm ( EntityId  $entityId)
private
Parameters
EntityId$entityId
Returns
null|Term

◆ getMatchedEntityIdSerializations()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::getMatchedEntityIdSerializations ( array  $matchedTermIndexEntries)
private
Parameters
TermIndexEntry[]$matchedTermIndexEntries
Returns
string[]

◆ getMatchingTermIndexEntries()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::getMatchingTermIndexEntries (   $text,
  $languageCode,
  $entityType,
array  $termTypes 
)
private
Parameters
string$text
string$languageCode
string$entityType
string[]$termTypes
Returns
TermIndexEntry[]

◆ getSearchResults()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::getSearchResults ( array  $termIndexEntries)
private
Parameters
TermIndexEntry[]$termIndexEntries
Returns
TermSearchResult[]

◆ getTermIndexOptions()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::getTermIndexOptions ( )
private

◆ makeTermIndexSearchCriteria()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::makeTermIndexSearchCriteria (   $text,
array  $languageCodes,
array  $termTypes 
)
private
Parameters
string$text
string[]$languageCodes
string[]$termTypes
Returns
TermIndexSearchCriteria[]

◆ preFetchLabelsAndDescriptionsForDisplay()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::preFetchLabelsAndDescriptionsForDisplay ( array  $entityIds)
private
Parameters
EntityId[]$entityIds

◆ searchForEntities()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::searchForEntities (   $text,
  $languageCode,
  $entityType,
array  $termTypes 
)
See also
TermSearchInteractor::searchForEntities
Parameters
string$text
string$languageCode
string$entityType
string[]$termTypes
Returns
TermSearchResult[]

Implements Wikibase\Lib\Interactors\TermSearchInteractor.

◆ setTermSearchOptions()

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::setTermSearchOptions ( TermSearchOptions  $termSearchOptions)

Member Data Documentation

◆ $bufferingTermLookup

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::$bufferingTermLookup
private

◆ $displayLanguageCode

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::$displayLanguageCode
private

◆ $labelDescriptionLookup

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::$labelDescriptionLookup
private

◆ $languageFallbackChainFactory

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::$languageFallbackChainFactory
private

◆ $matchingTermsLookup

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::$matchingTermsLookup
private

◆ $termSearchOptions

Wikibase\Lib\Interactors\MatchingTermsLookupSearchInteractor::$termSearchOptions
private

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