28 $configuredClass = $this->config->getSearchType();
29 $alternativesClasses = $this->config->getSearchTypes();
31 $lb = MediaWikiServices::getInstance()->getDBLoadBalancer();
32 if (
$type !==
null && in_array(
$type, $alternativesClasses ) ) {
34 } elseif ( $configuredClass !==
null ) {
35 $class = $configuredClass;
40 if ( is_subclass_of( $class, SearchDatabase::class ) ) {
41 return new $class( $lb );
55 : $dbOrLb->getServerType( $dbOrLb->getWriterIndex() );
59 return SearchSqlite::class;
61 return SearchMySQL::class;
63 return SearchPostgres::class;
65 return SearchEngineDummy::class;