MediaWiki  master
SearchEngineFactory Class Reference

Factory class for SearchEngine. More...

Collaboration diagram for SearchEngineFactory:

Public Member Functions

 __construct (SearchEngineConfig $config, HookContainer $hookContainer)
 
 create ( $type=null)
 Create SearchEngine of the given type. More...
 

Static Public Member Functions

static getSearchEngineClass ( $dbOrLb)
 

Private Attributes

SearchEngineConfig $config
 Configuration for SearchEngine classes. More...
 
HookContainer $hookContainer
 

Detailed Description

Factory class for SearchEngine.

Allows to create engine of the specific type.

Definition at line 13 of file SearchEngineFactory.php.

Constructor & Destructor Documentation

◆ __construct()

SearchEngineFactory::__construct ( SearchEngineConfig  $config,
HookContainer  $hookContainer 
)

Definition at line 23 of file SearchEngineFactory.php.

References $config, and $hookContainer.

Member Function Documentation

◆ create()

SearchEngineFactory::create (   $type = null)

Create SearchEngine of the given type.

Parameters
string | null$type
Returns
SearchEngine

Definition at line 34 of file SearchEngineFactory.php.

References $args, $type, and getSearchEngineClass().

◆ getSearchEngineClass()

static SearchEngineFactory::getSearchEngineClass (   $dbOrLb)
static
Parameters
IDatabase | ILoadBalancer$dbOrLb
Returns
string SearchEngine subclass name
Since
1.28

Definition at line 73 of file SearchEngineFactory.php.

References $type.

Referenced by create().

Member Data Documentation

◆ $config

SearchEngineConfig SearchEngineFactory::$config
private

Configuration for SearchEngine classes.

Definition at line 18 of file SearchEngineFactory.php.

Referenced by __construct().

◆ $hookContainer

HookContainer SearchEngineFactory::$hookContainer
private

Definition at line 21 of file SearchEngineFactory.php.

Referenced by __construct().


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