ElggInstaller::run PHP Method

run() public method

Dispatches a request to one of the step controllers
public run ( string $step ) : void
$step string The installation step to run
return void
    public function run($step)
    {
        global $CONFIG;
        // language needs to be set before the first call to elgg_echo()
        $CONFIG->language = 'en';
        // check if this is a URL rewrite test coming in
        $this->processRewriteTest();
        if (!in_array($step, $this->getSteps())) {
            $msg = _elgg_services()->translator->translate('InstallationException:UnknownStep', array($step));
            throw new InstallationException($msg);
        }
        $this->setInstallStatus();
        $this->checkInstallCompletion($step);
        // check if this is an install being resumed
        $this->resumeInstall($step);
        $this->finishBootstraping($step);
        $params = $this->getPostVariables();
        $this->{$step}($params);
    }

Usage Example

示例#1
0
<?php

/**
 * Elgg install script
 *
 * @package Elgg
 * @subpackage Core
 */
// check for PHP 4 before we do anything else
if (version_compare(PHP_VERSION, '5.0.0', '<')) {
    echo "Your server's version of PHP (" . PHP_VERSION . ") is too old to run Elgg.\n";
    exit;
}
require_once __DIR__ . "/vendor/autoload.php";
$installer = new ElggInstaller();
$step = get_input('step', 'welcome');
$installer->run($step);
All Usage Examples Of ElggInstaller::run