[TASK] Use proper PHP 5.5 class references (no singleton)
[Packages/TYPO3.CMS.git] / typo3 / sysext / indexed_search / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43('indexed_search');
5 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin('indexed_search', 'Pi2', array('Search' => 'form,search'), array('Search' => 'form,search'));
6 // Attach to hooks:
7 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing'][] = \TYPO3\CMS\IndexedSearch\Indexer::class;
8 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['headerNoCache']['tx_indexedsearch'] = \TYPO3\CMS\IndexedSearch\Hook\TypoScriptFrontendHook::class . '->headerNoCache';
9 // Register with "crawler" extension:
10 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['procInstructions']['tx_indexedsearch_reindex'] = 'Re-indexing';
11 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['crawler']['cli_hooks']['tx_indexedsearch_crawl'] = \TYPO3\CMS\IndexedSearch\Hook\CrawlerHook::class;
12 // Register with TCEmain:
13 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['tx_indexedsearch'] = \TYPO3\CMS\IndexedSearch\Hook\CrawlerHook::class;
14 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['tx_indexedsearch'] = \TYPO3\CMS\IndexedSearch\Hook\CrawlerHook::class;
15 // Configure default document parsers:
16 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['external_parsers'] = array(
17 'pdf' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
18 'doc' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
19 'pps' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
20 'ppt' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
21 'xls' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
22 'sxc' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
23 'sxi' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
24 'sxw' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
25 'ods' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
26 'odp' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
27 'odt' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
28 'rtf' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
29 'txt' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
30 'html' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
31 'htm' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
32 'csv' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
33 'xml' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
34 'jpg' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
35 'jpeg' => \TYPO3\CMS\IndexedSearch\FileContentParser::class,
36 'tif' => \TYPO3\CMS\IndexedSearch\FileContentParser::class
37 );
38 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['use_tables'] = 'index_phash,index_fulltext,index_rel,index_words,index_section,index_grlist,index_stat_search,index_stat_word,index_debug,index_config';
39 // unserializing the configuration so we can use it here:
40 $_EXTCONF = unserialize($_EXTCONF);
41 // Use the advanced doubleMetaphone parser instead of the internal one (usage of metaphone parsers is generally disabled by default)
42 if (isset($_EXTCONF['enableMetaphoneSearch']) && (int)$_EXTCONF['enableMetaphoneSearch'] == 2) {
43 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['indexed_search']['metaphone'] = \TYPO3\CMS\IndexedSearch\Utility\DoubleMetaPhoneUtility::class;
44 }