| 1 | <?php |
||
| 7 | class SearchEngineFactory { |
||
| 8 | /** |
||
| 9 | * Configuration for SearchEngine classes. |
||
| 10 | * @var SearchEngineConfig |
||
| 11 | */ |
||
| 12 | private $config; |
||
| 13 | |||
| 14 | public function __construct( SearchEngineConfig $config ) { |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Create SearchEngine of the given type. |
||
| 20 | * @param string $type |
||
| 21 | * @return SearchEngine |
||
| 22 | */ |
||
| 23 | public function create( $type = null ) { |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param IDatabase $db |
||
| 44 | * @return string SearchEngine subclass name |
||
| 45 | * @since 1.28 |
||
| 46 | */ |
||
| 47 | public static function getSearchEngineClass( IDatabase $db ) { |
||
| 63 | } |
||
| 64 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: