MediaWiki  1.28.0
SearchEngineFactory Class Reference

Factory class for SearchEngine. More...

Collaboration diagram for SearchEngineFactory:

Public Member Functions

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

Static Public Member Functions

static getSearchEngineClass (IDatabase $db)
 

Private Attributes

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

Detailed Description

Factory class for SearchEngine.

Allows to create engine of the specific type.

Definition at line 7 of file SearchEngineFactory.php.

Constructor & Destructor Documentation

SearchEngineFactory::__construct ( SearchEngineConfig  $config)

Definition at line 14 of file SearchEngineFactory.php.

References $config.

Member Function Documentation

SearchEngineFactory::create (   $type = null)

Create SearchEngine of the given type.

Parameters
string$type
Returns
SearchEngine

Definition at line 23 of file SearchEngineFactory.php.

References $dbr, $type, DB_REPLICA, and wfGetDB().

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

Definition at line 47 of file SearchEngineFactory.php.

References IDatabase\getType().

Referenced by Database\getSearchEngine(), and SearchEngineTest\setUp().

Member Data Documentation

SearchEngineConfig SearchEngineFactory::$config
private

Configuration for SearchEngine classes.

Definition at line 12 of file SearchEngineFactory.php.

Referenced by __construct().


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