Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Interactors\DispatchingTermSearchInteractor Class Reference

Picks a TermSearchInteractor configured for the particular entity type when searching for entities. More...

+ Inheritance diagram for Wikibase\Lib\Interactors\DispatchingTermSearchInteractor:
+ Collaboration diagram for Wikibase\Lib\Interactors\DispatchingTermSearchInteractor:

Public Member Functions

 __construct (array $interactors)
 
 searchForEntities ( $text, $languageCode, $entityType, array $termTypes)
 
 setTermSearchOptions (TermSearchOptions $termSearchOptions)
 

Private Member Functions

 getInteractorForEntityType ( $entityType)
 

Private Attributes

 $interactors = []
 
 $searchOptions
 

Detailed Description

Picks a TermSearchInteractor configured for the particular entity type when searching for entities.

TODO: rename to DispatchingByEntityTypeTermSearchInteractor ?

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Interactors\DispatchingTermSearchInteractor::__construct ( array  $interactors)
Parameters
TermSearchInteractor[]$interactorsAssociative array mapping entity types (strings) to TermSearchInteractor instances
Exceptions
ParameterAssertionException

Member Function Documentation

◆ getInteractorForEntityType()

Wikibase\Lib\Interactors\DispatchingTermSearchInteractor::getInteractorForEntityType (   $entityType)
private
Parameters
string$entityType
Returns
TermSearchInteractor|null

◆ searchForEntities()

Wikibase\Lib\Interactors\DispatchingTermSearchInteractor::searchForEntities (   $text,
  $languageCode,
  $entityType,
array  $termTypes 
)
See also
TermSearchInteractor::searchForEntities
Parameters
string$text
string$languageCode
string$entityType
string[]$termTypes
Returns
TermSearchResult[] Returns an empty array also when there is no TermSearchInteractor configured for $entityType

Implements Wikibase\Lib\Interactors\TermSearchInteractor.

◆ setTermSearchOptions()

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

Member Data Documentation

◆ $interactors

Wikibase\Lib\Interactors\DispatchingTermSearchInteractor::$interactors = []
private

◆ $searchOptions

Wikibase\Lib\Interactors\DispatchingTermSearchInteractor::$searchOptions
private

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