1 | <?php |
||
55 | class DeckProvider implements IFullTextSearchProvider { |
||
56 | |||
57 | |||
58 | const DECK_PROVIDER_ID = 'deck'; |
||
59 | |||
60 | |||
61 | /** @var IL10N */ |
||
62 | private $l10n; |
||
63 | |||
64 | /** @var IUrlGenerator */ |
||
65 | private $urlGenerator; |
||
66 | |||
67 | /** @var FullTextSearchService */ |
||
68 | private $fullTextSearchService; |
||
69 | |||
70 | |||
71 | /** @var IRunner */ |
||
72 | private $runner; |
||
73 | |||
74 | /** @var IIndexOptions */ |
||
75 | private $indexOptions = []; |
||
76 | |||
77 | |||
78 | /** |
||
79 | * DeckProvider constructor. |
||
80 | * |
||
81 | * @param IL10N $l10n |
||
82 | * @param IUrlGenerator $urlGenerator |
||
83 | * @param FullTextSearchService $fullTextSearchService |
||
84 | */ |
||
85 | public function __construct( |
||
92 | |||
93 | |||
94 | /** |
||
95 | * return unique id of the provider |
||
96 | */ |
||
97 | public function getId(): string { |
||
100 | |||
101 | |||
102 | /** |
||
103 | * return name of the provider |
||
104 | */ |
||
105 | public function getName(): string { |
||
108 | |||
109 | |||
110 | /** |
||
111 | * @return array |
||
112 | */ |
||
113 | public function getConfiguration(): array { |
||
116 | |||
117 | |||
118 | /** |
||
119 | * @param IRunner $runner |
||
120 | */ |
||
121 | public function setRunner(IRunner $runner) { |
||
124 | |||
125 | |||
126 | /** |
||
127 | * @param IIndexOptions $options |
||
128 | */ |
||
129 | public function setIndexOptions(IIndexOptions $options) { |
||
132 | |||
133 | |||
134 | /** |
||
135 | * @return ISearchTemplate |
||
136 | */ |
||
137 | public function getSearchTemplate(): ISearchTemplate { |
||
142 | |||
143 | |||
144 | /** |
||
145 | * |
||
146 | */ |
||
147 | public function loadProvider() { |
||
149 | |||
150 | |||
151 | |||
152 | /** |
||
153 | * @param string $userId |
||
154 | * |
||
155 | * @return string[] |
||
156 | */ |
||
157 | public function generateChunks(string $userId): array { |
||
160 | |||
161 | |||
162 | /** |
||
163 | * @param string $userId |
||
164 | * @param string $chunk |
||
165 | * |
||
166 | * @return IIndexDocument[] |
||
167 | */ |
||
168 | public function generateIndexableDocuments(string $userId, string $chunk): array { |
||
178 | |||
179 | |||
180 | /** |
||
181 | * @param IIndexDocument $document |
||
182 | * |
||
183 | * @throws DoesNotExistException |
||
184 | * @throws MultipleObjectsReturnedException |
||
185 | */ |
||
186 | public function fillIndexDocument(IIndexDocument $document) { |
||
190 | |||
191 | |||
192 | /** |
||
193 | * @param IIndexDocument $document |
||
194 | * |
||
195 | * @return bool |
||
196 | */ |
||
197 | public function isDocumentUpToDate(IIndexDocument $document): bool { |
||
200 | |||
201 | |||
202 | /** |
||
203 | * @param IIndex $index |
||
204 | * |
||
205 | * @return IIndexDocument |
||
206 | * @throws DoesNotExistException |
||
207 | * @throws MultipleObjectsReturnedException |
||
208 | */ |
||
209 | public function updateDocument(IIndex $index): IIndexDocument { |
||
217 | |||
218 | |||
219 | /** |
||
220 | * @param IFullTextSearchPlatform $platform |
||
221 | */ |
||
222 | public function onInitializingIndex(IFullTextSearchPlatform $platform) { |
||
224 | |||
225 | |||
226 | /** |
||
227 | * @param IFullTextSearchPlatform $platform |
||
228 | */ |
||
229 | public function onResettingIndex(IFullTextSearchPlatform $platform) { |
||
231 | |||
232 | |||
233 | /** |
||
234 | * not used yet |
||
235 | */ |
||
236 | public function unloadProvider() { |
||
238 | |||
239 | |||
240 | /** |
||
241 | * before a search, improve the request |
||
242 | * |
||
243 | * @param ISearchRequest $request |
||
244 | */ |
||
245 | public function improveSearchRequest(ISearchRequest $request) { |
||
247 | |||
248 | |||
249 | /** |
||
250 | * after a search, improve results |
||
251 | * |
||
252 | * @param ISearchResult $searchResult |
||
253 | */ |
||
254 | public function improveSearchResult(ISearchResult $searchResult) { |
||
266 | |||
267 | |||
268 | /** |
||
269 | * @param string $info |
||
270 | * @param string $value |
||
271 | */ |
||
272 | private function updateRunnerInfo(string $info, string $value) { |
||
279 | |||
280 | } |
||
281 | |||
282 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..