1 | <?php |
||
38 | class IndexQueueWorkerTask extends AbstractSolrTask implements ProgressProviderInterface |
||
39 | { |
||
40 | /** |
||
41 | * @var int |
||
42 | */ |
||
43 | protected $documentsToIndexLimit; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $forcedWebRoot = ''; |
||
49 | |||
50 | /** |
||
51 | * Works through the indexing queue and indexes the queued items into Solr. |
||
52 | * |
||
53 | * @return bool Returns TRUE on success, FALSE if no items were indexed or none were found. |
||
54 | */ |
||
55 | public function execute() |
||
79 | 1 | ||
80 | /** |
||
81 | 1 | * In the cli context TYPO3 has chance to determine the webroot. |
|
82 | 1 | * Since we need it for the TSFE related things we allow to set it |
|
83 | * in the scheduler task and use the ###PATH_typo3### marker in the |
||
84 | * setting to be able to define relative paths. |
||
85 | 1 | * |
|
86 | * @return string |
||
87 | 1 | */ |
|
88 | public function getWebRoot() |
||
98 | 3 | ||
99 | /** |
||
100 | 3 | * @param string $webRoot |
|
101 | 1 | * @return string |
|
102 | */ |
||
103 | protected function replaceWebRootMarkers($webRoot) |
||
115 | 1 | ||
116 | /** |
||
117 | * Returns some additional information about indexing progress, shown in |
||
118 | * the scheduler's task overview list. |
||
119 | 1 | * |
|
120 | 1 | * @return string Information to display |
|
121 | */ |
||
122 | public function getAdditionalInformation() |
||
138 | 1 | ||
139 | /** |
||
140 | 1 | * Gets the indexing progress. |
|
141 | * |
||
142 | * @return float Indexing progress as a two decimal precision float. f.e. 44.87 |
||
143 | */ |
||
144 | 1 | public function getProgress() |
|
151 | |||
152 | /** |
||
153 | * @return mixed |
||
154 | 1 | */ |
|
155 | public function getDocumentsToIndexLimit() |
||
159 | 1 | ||
160 | /** |
||
161 | * @param int $limit |
||
162 | */ |
||
163 | public function setDocumentsToIndexLimit($limit) |
||
167 | |||
168 | /** |
||
169 | * @param string $forcedWebRoot |
||
170 | */ |
||
171 | public function setForcedWebRoot($forcedWebRoot) |
||
175 | |||
176 | /** |
||
177 | * @return string |
||
178 | 2 | */ |
|
179 | public function getForcedWebRoot() |
||
183 | |||
184 | /** |
||
185 | * Returns the initialize IndexService instance. |
||
186 | * |
||
187 | * @return IndexService |
||
188 | */ |
||
189 | protected function getInitializedIndexService() |
||
195 | } |
||
196 |