ElggInstaller::finishBootstraping PHP Method

finishBootstraping() protected method

Load remaining engine libraries and complete bootstrapping
protected finishBootstraping ( string $step ) : void
$step string Which step to boot strap for. Required because boot strapping is different until the DB is populated.
return void
    protected function finishBootstraping($step)
    {
        $dbIndex = array_search('database', $this->getSteps());
        $settingsIndex = array_search('settings', $this->getSteps());
        $adminIndex = array_search('admin', $this->getSteps());
        $completeIndex = array_search('complete', $this->getSteps());
        $stepIndex = array_search($step, $this->getSteps());
        // To log in the user, we need to use the Elgg core session handling.
        // Otherwise, use default php session handling
        $useElggSession = $stepIndex == $adminIndex && $this->isAction || $stepIndex == $completeIndex;
        if (!$useElggSession) {
            session_name('Elgg_install');
            session_start();
            _elgg_services()->events->unregisterHandler('boot', 'system', 'session_init');
        }
        if ($stepIndex > $dbIndex) {
            // once the database has been created, load rest of engine
            $lib_dir = \Elgg\Application::elggDir()->chroot('/engine/lib/');
            $this->loadSettingsFile();
            $lib_files = array('autoloader.php', 'database.php', 'actions.php', 'admin.php', 'annotations.php', 'cron.php', 'entities.php', 'extender.php', 'filestore.php', 'group.php', 'mb_wrapper.php', 'memcache.php', 'metadata.php', 'metastrings.php', 'navigation.php', 'notification.php', 'objects.php', 'pagehandler.php', 'pam.php', 'plugins.php', 'private_settings.php', 'relationships.php', 'river.php', 'sites.php', 'statistics.php', 'tags.php', 'user_settings.php', 'users.php', 'upgrade.php', 'widgets.php');
            foreach ($lib_files as $file) {
                if (!(include_once $lib_dir->getPath($file))) {
                    throw new InstallationException('InstallationException:MissingLibrary', array($file));
                }
            }
            _elgg_services()->db->setupConnections();
            _elgg_services()->translator->registerTranslations(\Elgg\Application::elggDir()->getPath("/languages/"));
            $this->CONFIG->language = 'en';
            if ($stepIndex > $settingsIndex) {
                $this->CONFIG->site_guid = (int) _elgg_services()->configTable->get('default_site');
                $this->CONFIG->site = get_entity($this->CONFIG->site_guid);
                $this->CONFIG->dataroot = _elgg_services()->configTable->get('dataroot');
                _elgg_services()->config->getCookieConfig();
                _elgg_session_boot();
            }
            _elgg_services()->events->trigger('init', 'system');
        }
    }