1 | <?php |
||
43 | class TestProvider implements IFullTextSearchProvider { |
||
44 | |||
45 | |||
46 | const TEST_PROVIDER_ID = 'test_provider'; |
||
47 | |||
48 | /** @var ConfigService */ |
||
49 | private $configService; |
||
50 | |||
51 | /** @var TestService */ |
||
52 | private $testService; |
||
53 | |||
54 | /** @var MiscService */ |
||
55 | private $miscService; |
||
56 | |||
57 | /** @var Runner */ |
||
58 | private $runner; |
||
59 | |||
60 | /** @var IndexOptions */ |
||
61 | private $indexOptions; |
||
62 | |||
63 | |||
64 | /** |
||
65 | * TestProvider constructor. |
||
66 | * |
||
67 | * @param ConfigService $configService |
||
68 | * @param TestService $testService |
||
69 | * @param MiscService $miscService |
||
70 | */ |
||
71 | public function __construct( |
||
80 | |||
81 | |||
82 | /** |
||
83 | * return unique id of the provider |
||
84 | */ |
||
85 | public function getId() { |
||
88 | |||
89 | |||
90 | /** |
||
91 | * return name of the provider |
||
92 | */ |
||
93 | public function getName() { |
||
96 | |||
97 | |||
98 | /** |
||
99 | * @return array |
||
100 | */ |
||
101 | public function getConfiguration() { |
||
104 | |||
105 | |||
106 | public function setRunner(Runner $runner) { |
||
109 | |||
110 | |||
111 | /** |
||
112 | * @param IndexOptions $options |
||
113 | */ |
||
114 | public function setIndexOptions($options) { |
||
117 | |||
118 | |||
119 | /** |
||
120 | * @return array |
||
121 | */ |
||
122 | public function getOptionsTemplate() { |
||
125 | |||
126 | |||
127 | /** |
||
128 | * called when loading all providers. |
||
129 | * |
||
130 | * Loading some containers. |
||
131 | */ |
||
132 | public function loadProvider() { |
||
134 | |||
135 | |||
136 | /** |
||
137 | * returns all indexable document for a user. |
||
138 | * There is no need to fill the document with content at this point. |
||
139 | * |
||
140 | * $platform is provided if the mapping needs to be changed. |
||
141 | * |
||
142 | * @param string $userId |
||
143 | * |
||
144 | * @return IndexDocument[] |
||
145 | */ |
||
146 | public function generateIndexableDocuments($userId) { |
||
156 | |||
157 | |||
158 | /** |
||
159 | * generate documents prior to the indexing. |
||
160 | * throw NoResultException if no more result |
||
161 | * |
||
162 | * @param IndexDocument[] $chunk |
||
163 | * |
||
164 | * @deprecated |
||
165 | * @return IndexDocument[] |
||
166 | */ |
||
167 | public function fillIndexDocuments($chunk) { |
||
170 | |||
171 | |||
172 | /** |
||
173 | * generate documents prior to the indexing. |
||
174 | * |
||
175 | * @param IndexDocument $document |
||
176 | */ |
||
177 | public function fillIndexDocument(IndexDocument $document) { |
||
179 | |||
180 | |||
181 | /** |
||
182 | * @param IndexDocument $document |
||
183 | * |
||
184 | * @return bool |
||
185 | */ |
||
186 | public function isDocumentUpToDate($document) { |
||
189 | |||
190 | |||
191 | /** |
||
192 | * @param Index $index |
||
193 | * |
||
194 | * @return IndexDocument|null |
||
195 | */ |
||
196 | public function updateDocument(Index $index) { |
||
199 | |||
200 | |||
201 | /** |
||
202 | * @param IFullTextSearchPlatform $platform |
||
203 | */ |
||
204 | public function onInitializingIndex(IFullTextSearchPlatform $platform) { |
||
206 | |||
207 | |||
208 | /** |
||
209 | * @param IFullTextSearchPlatform $platform |
||
210 | */ |
||
211 | public function onResettingIndex(IFullTextSearchPlatform $platform) { |
||
213 | |||
214 | |||
215 | /** |
||
216 | * not used yet |
||
217 | */ |
||
218 | public function unloadProvider() { |
||
220 | |||
221 | |||
222 | /** |
||
223 | * before a search, improve the request |
||
224 | * |
||
225 | * @param SearchRequest $request |
||
226 | */ |
||
227 | public function improveSearchRequest(SearchRequest $request) { |
||
229 | |||
230 | |||
231 | /** |
||
232 | * after a search, improve results |
||
233 | * |
||
234 | * @param SearchResult $searchResult |
||
235 | */ |
||
236 | public function improveSearchResult(SearchResult $searchResult) { |
||
238 | |||
239 | |||
240 | } |
||
241 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.