1 | <?php |
||
11 | class FulltextSearch extends DataSearch { |
||
12 | |||
13 | /** @var string */ |
||
14 | private $_mode; |
||
15 | |||
16 | /** @var string */ |
||
17 | private $_databaseDriver; |
||
18 | |||
19 | /** |
||
20 | * FulltextSearch constructor. |
||
21 | * @param array $searchableFields |
||
22 | * @param string|null $mode |
||
23 | */ |
||
24 | 3 | public function __construct(array $searchableFields = [], string $mode = null) |
|
30 | |||
31 | /** |
||
32 | * Set the mode for the full text search. |
||
33 | * Available modes: |
||
34 | * "IN NATURAL LANGUAGE MODE", "IN BOOLEAN MODE", "WITH QUERY EXPANSION" |
||
35 | * @see https://dev.mysql.com/doc/refman/5.7/en/fulltext-search.html |
||
36 | * |
||
37 | * @param string $mode |
||
38 | * @return DataSearch |
||
|
|||
39 | */ |
||
40 | 1 | public function setMode(string $mode) : DataSearch |
|
46 | |||
47 | /** |
||
48 | * @param Builder $queryBuilder |
||
49 | * @param string $value |
||
50 | * @return void |
||
51 | */ |
||
52 | 2 | protected function _searchFields(Builder $queryBuilder, string $value) : void |
|
56 | |||
57 | /** |
||
58 | * This has to be improved. |
||
59 | * @param string $value |
||
60 | * @return string |
||
61 | */ |
||
62 | 2 | private function _getMatchQuery(string $value) : string |
|
78 | } |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.