Ejemplo n.º 1
0
* must display the words "Powered by eyeos" and retain the original copyright notice. 
*/
define('FRAMEWORK_SEARCH_TOKENS_DIR', 'Tokens');
define('FRAMEWORK_SEARCH_TOKENS_PATH', FRAMEWORK_SEARCH_PATH . '/' . FRAMEWORK_SEARCH_TOKENS_DIR);
define('FRAMEWORK_SEARCH_PLUGINS_DIR', 'SearchPlugins');
define('FRAMEWORK_SEARCH_PLUGINS_PATH', FRAMEWORK_SEARCH_PATH . '/' . FRAMEWORK_SEARCH_PLUGINS_DIR);
define('FRAMEWORK_SEARCH_UTILS_DIR', 'utils');
define('FRAMEWORK_SEARCH_UTILS_PATH', FRAMEWORK_SEARCH_PATH . '/' . FRAMEWORK_SEARCH_UTILS_DIR);
require_once FRAMEWORK_SEARCH_PATH . '/interfaces.php';
require_once FRAMEWORK_SEARCH_PATH . '/SearchController.php';
require_once FRAMEWORK_SEARCH_PATH . '/SearchQuery.php';
require_once FRAMEWORK_SEARCH_PATH . '/ParserManager.php';
require_once FRAMEWORK_SEARCH_PATH . '/SearchManager.php';
// FIXME: to be putted inside Searchmanager class!!
$tokens = new DirectoryIterator(FRAMEWORK_SEARCH_TOKENS_PATH);
foreach ($tokens as $fileInfo) {
    $fileInfoName = $fileInfo->getFileName();
    if (!$fileInfo->isDot() && strpos($fileInfoName, '.php')) {
        require_once FRAMEWORK_SEARCH_TOKENS_PATH . '/' . $fileInfoName;
    }
}
// FIXME: to be deleted ?!?!
$abstractPlugins = new DirectoryIterator(FRAMEWORK_SEARCH_PLUGINS_PATH);
foreach ($abstractPlugins as $plugin) {
    $fileName = $plugin->getFilename();
    if ($plugin->isFile() && $fileName[0] != '.') {
        require FRAMEWORK_SEARCH_PLUGINS_PATH . '/' . $plugin->getFilename();
    }
}
SearchManager::init();