Commit | Line | Data |
---|---|---|
4bcd4c62 TO |
1 | <?php |
2 | /** | |
3 | * @file | |
4 | * | |
1cc5f393 TO |
5 | * Perform the full bootstrap. |
6 | * | |
7 | * GOAL: All the standard services (database, DAOs, translations, settings, etc) should be loaded. | |
8 | * | |
255d61a3 | 9 | * MECHANICS: This basically calls `CRM_Core_Config::singleton(TRUE,TRUE)`. |
1cc5f393 TO |
10 | * |
11 | * NOTE: This is technically a *reboot*. `Preboot` started things off, but it | |
12 | * booted with `CRM_Core_Config::singleton($loadFromDB==FALSE)`. Now, the DB is | |
13 | * populated, so we can teardown the preboot stuff and start again with `$loadFromDB==TRUE`. | |
4bcd4c62 TO |
14 | */ |
15 | ||
16 | if (!defined('CIVI_SETUP')) { | |
17 | exit("Installation plugins must only be loaded by the installer.\n"); | |
18 | } | |
19 | ||
20 | \Civi\Setup::dispatcher() | |
21 | ->addListener('civi.setup.installDatabase', function (\Civi\Setup\Event\InstallDatabaseEvent $e) { | |
22 | \Civi\Setup::log()->info(sprintf('[%s] Bootstrap CiviCRM', basename(__FILE__))); | |
23 | ||
1cc5f393 TO |
24 | \CRM_Core_I18n::$SQL_ESCAPER = NULL; |
25 | unset(\Civi::$statics['testPreInstall']); | |
4bcd4c62 | 26 | |
1cc5f393 | 27 | CRM_Core_Config::singleton(TRUE, TRUE); |
4bcd4c62 TO |
28 | |
29 | }, \Civi\Setup::PRIORITY_MAIN - 200); |