Execute installation

@return void
163212
public function run() : void
    {
        $hooks = $this->getHooksToInstall();

        foreach ($hooks as $hook => $ask) {
            $this->installHook($hook, ($ask && !$this->force));
        }
    }
254145
protected function processInstall()
    {
        $result = $this->install->process($this->getSubmitted());
        $this->redirect($result['redirect'], $result['message'], $result['severity']);
    }
51455
public function execute()
    {
        $this->triggerBeforeCreationEvent();
        $operation = $this->getAddOperation()->setServer($this->server);
        $this->connection->execute($operation);
        $this->triggerAfterCreationEvent($operation);
    }
977604
public function execute()
    {
        /** @var $composer \Composer\Composer */
        $composer = $this->getComposer();
        $installationManager = $composer->getInstallationManager();
        $localRepo = $composer->getRepositoryManager()->getLocalRepository();
        $package = $composer->getPackage();
        $config = $composer->getConfig();

        $optimize = $this->getOptions()->optimize() || $this->getOptions()->optimizeAutoloader();
        $authoritative = $this->getOptions()->classmapAuthoritative() || $config->get('classmap-authoritative');

        if ($optimize || $authoritative) {
            $this->getIO()->writeError('<info>Generating optimized autoload files</info>');
        } else {
            $this->getIO()->writeError('<info>Generating autoload files</info>');
        }

        $generator = $composer->getAutoloadGenerator();
        $generator->setDevMode(!$this->getOptions()->noDev());
        $generator->setClassMapAuthoritative($authoritative);
        $generator->setRunScripts(!$this->getOptions()->noScripts());

        try {
            $generator->dump($config, $localRepo, $package, $installationManager, 'composer', $optimize);
        } catch (\Exception $e) {
            $msg = sprintf('%s received an error from Composer: %s in %s::%s', __METHOD__, $e->getMessage(), $e->getFile(), $e->getLine());
            $this->app['logger.system']->critical($msg, ['event' => 'exception', 'exception' => $e]);

            throw new PackageManagerException($e->getMessage(), $e->getCode(), $e);
        }

        return 0;
    }
1127582
public function engineInstall()
    {
        $this->executeCommandHook(__FUNCTION__, 'before');
        $this->executeExistingCommand('env:install');
        $this->executeCommandHook(__FUNCTION__, 'after');

        return $this;
    }
724049
public function install()
    {
        $this->extractZip($this->downloadZip());

        rename($this->sparkPath(), $this->command->path.'/spark');

        (new Filesystem)->deleteDirectory(
            $this->command->path.'/spark-new'
        );
    }
1054836
public function execute()
    {
        // Update the build in the database, ping any external services.
        $this->build->setStatus(Build::STATUS_RUNNING);
        $this->build->setStarted(new \DateTime());
        $this->store->save($this->build);
        $this->build->sendStatusPostback();
        $success = true;

        $previous_build = $this->build->getProject()->getPreviousBuild($this->build->getBranch());

        $previous_state = Build::STATUS_NEW;

        if ($previous_build) {
            $previous_state = $previous_build->getStatus();
        }

        try {
            // Set up the build:
            $this->setupBuild();

            // Run the core plugin stages:
            foreach (array('setup', 'test') as $stage) {
                $success &= $this->pluginExecutor->executePlugins($this->config, $stage);
            }

            // Set the status so this can be used by complete, success and failure
            // stages.
            if ($success) {
                $this->build->setStatus(Build::STATUS_SUCCESS);
            } else {
                $this->build->setStatus(Build::STATUS_FAILED);
            }


            if ($success) {
                $this->pluginExecutor->executePlugins($this->config, 'success');

                if ($previous_state == Build::STATUS_FAILED) {
                    $this->pluginExecutor->executePlugins($this->config, 'fixed');
                }

                $this->buildLogger->logSuccess(Lang::get('build_success'));
            } else {
                $this->pluginExecutor->executePlugins($this->config, 'failure');

                if ($previous_state == Build::STATUS_SUCCESS || $previous_state == Build::STATUS_NEW) {
                    $this->pluginExecutor->executePlugins($this->config, 'broken');
                }

                $this->buildLogger->logFailure(Lang::get('build_failed'));
            }
        } catch (\Exception $ex) {
            $this->build->setStatus(Build::STATUS_FAILED);
            $this->buildLogger->logFailure(Lang::get('exception') . $ex->getMessage());
        }finally{
            // Complete stage plugins are always run
            $this->pluginExecutor->executePlugins($this->config, 'complete');
        }


        // Update the build in the database, ping any external services, etc.
        $this->build->sendStatusPostback();
        $this->build->setFinished(new \DateTime());

        // Clean up:
        $this->buildLogger->log(Lang::get('removing_build'));
        $this->build->removeBuildDirectory();

        $this->store->save($this->build);
    }
371285
function install() {
    if(getenv('CIRCLECI')) {
      // Do nothing custom here.
      return $this->trueFreshInstall();
    }
    elseif ($this->databaseSourceOfTruth()) {
      $this->prepareLocal();
    }
    else {
      $this->trueFreshInstall();
      $this->postInstall();
    }
  }
685844
public function install() {
		if (file_exists(__DIR__.'/../../../../../../mouf/no_commit/MoufUsers.php')) {
			$this->contentBlock->addFile(dirname(__FILE__)."/../../views/mouf_installer/moufusers_exists.php", $this);
			$this->template->toHtml();
			return;
		}
		
		$oldUmask = umask();
		umask(0);
		
		// Now, let's write the basic Mouf files:
		if (!file_exists(__DIR__."/../../../../../../mouf")) {
			mkdir(__DIR__."/../../../../../../mouf", 0775);
		}
		if (!file_exists(__DIR__."/../../../../../../mouf/no_commit")) {
			mkdir(__DIR__."/../../../../../../mouf/no_commit", 0775);
		}
		
		
		// Write Mouf.php (always):
		//if (!file_exists(__DIR__."/../../../../../../mouf/Mouf.php")) {
			$moufStr = "<?php
define('ROOT_PATH', realpath(__DIR__.'/..').DIRECTORY_SEPARATOR);
require_once __DIR__.'/../config.php';
if (defined('ROOT_URL')) {
	define('MOUF_URL', ROOT_URL.'vendor/mouf/mouf/');
}
		
require_once __DIR__.'/../vendor/autoload.php';
		
require_once 'MoufComponents.php';
?>";
		
			file_put_contents(__DIR__."/../../../../../../mouf/Mouf.php", $moufStr);
			// Change rights on Mouf.php, but ignore errors (the file might be writable but still belong to someone else).
			@chmod(__DIR__."/../../../../../../mouf/Mouf.php", 0664);
		//}
		
		
		
		// Write MoufComponents.php:
		if (!file_exists(__DIR__."/../../../../../../mouf/MoufComponents.php")) {
			$moufComponentsStr = "<?php
/**
 * This is a file automatically generated by the Mouf framework. Do not modify it, as it could be overwritten.
 */
		
use Mouf\MoufManager;
MoufManager::initMoufManager();
\$moufManager = MoufManager::getMoufManager();
		
?>";
		
			file_put_contents(__DIR__."/../../../../../../mouf/MoufComponents.php", $moufComponentsStr);
			chmod(__DIR__."/../../../../../../mouf/MoufComponents.php", 0664);
		}
		
		// Finally, let's generate the MoufUI.php file:
		if (!file_exists(__DIR__."/../../../../../../mouf/MoufUI.php")) {
			$moufUIStr = "<?php
/**
 * This is a file automatically generated by the Mouf framework. Do not modify it, as it could be overwritten.
 */
		
	?>";
		
			file_put_contents(__DIR__."/../../../../../../mouf/MoufUI.php", $moufUIStr);
			chmod(__DIR__."/../../../../../../mouf/MoufUI.php", 0664);
		}
		
		// Finally 2, let's generate the config.php file:
		if (!file_exists(__DIR__."/../../../../../../config.php")) {
			$moufConfig = "<?php
/**
 * This is a file automatically generated by the Mouf framework. Do not modify it, as it could be overwritten.
 * Use the UI to edit it instead.
 */
		
?>";
		
			file_put_contents(__DIR__."/../../../../../../config.php", $moufConfig);
			chmod(__DIR__."/../../../../../../config.php", 0664);
		}
		
		// Finally 3 :), let's generate the MoufUsers.php file:
		if (!file_exists(__DIR__."/../../../../../../mouf/no_commit/MoufUsers.php")) {
			$moufConfig = "<?php
/**
 * This contains the users allowed to access the Mouf framework.
 */
\$users[".var_export(userinput_to_plainstring($_REQUEST['login']), true)."] = array('password'=>".var_export(sha1(userinput_to_plainstring($_REQUEST['password'])), true).", 'options'=>null);
		
?>";
		
			file_put_contents(__DIR__."/../../../../../../mouf/no_commit/MoufUsers.php", $moufConfig);
			chmod(__DIR__."/../../../../../../mouf/no_commit/MoufUsers.php", 0664);
		}
		
		umask($oldUmask);
		
		header("Location: ".ROOT_URL);
		
		
	}
162407
public static function install()
    {
        global $PPHP;
        $db = $PPHP['db'];

        echo "    Installing emails...";
        $db->begin();
        $db->exec(
            "
            CREATE TABLE IF NOT EXISTS 'emails' (
                id          INTEGER PRIMARY KEY AUTOINCREMENT,
                sender      INTEGER NOT NULL DEFAULT '0',
                isSent      BOOL NOT NULL DEFAULT '0',
                modified    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
                contextType VARCHAR(64) DEFAULT NULL,
                contextId   INTEGER DEFAULT NULL,
                mailfrom    INTEGER NOT NULL DEFAULT '0',
                recipients  VARCHAR(255) NOT NULL DEFAULT '',
                ccs         VARCHAR(255) NOT NULL DEFAULT '',
                bccs        VARCHAR(255) NOT NULL DEFAULT '',
                subject     TEXT NOT NULL DEFAULT '',
                html        TEXT NOT NULL DEFAULT '',
                files       BLOB,
                FOREIGN KEY(sender) REFERENCES users(id)
            )
            "
        );
        $db->commit();
        echo "    done!\n";
    }
1246432
public function boot()
    {
        /*
         * Migrations
         */
        $this->publishes([
            __DIR__ . '/../database/factories' => database_path('factories/'),
        ], $this->package_tag . '-factories');
        $this->publishes([
            __DIR__ . '/../database/migrations' => database_path('migrations/'),
        ], $this->package_tag . '-migrations');
        $this->publishes([
            __DIR__ . '/../database/seeds' => database_path('seeds/'),
        ], $this->package_tag . '-seeds');

        /*
         * Commands
         */
        if ($this->app->runningInConsole()) {
            $this->commands([
                \CleaniqueCoders\Profile\Console\Commands\SeedProfileCommand::class,
            ]);
        }
    }
1371237
public function install()
    {
        // 1. Set options
        $this->setOptions($this->config->options());

        // 2. Activate plugins
        $this->activatePlugins($this->config->plugins());

        // 3. Maybe set the theme (and settings)
        if ($theme = $this->config->theme()) {
            $this->setTheme($theme->name, $theme->mods, $theme->options, $theme->menus, $theme->sidebars);
        }

        // 4. Maybe set the permalink structure
        global $wp_rewrite;
        if ($wp_rewrite && $permalinks = $this->config->permalinks()) {
            $this->setPermalinkStructure($wp_rewrite, $permalinks);
        }

        // 5. Maybe set the timezone
        if ($timezone = $this->config->timezone()) {
            $this->setTimezone($timezone);
        }
    }
719729
protected function processInstall()
    {
        if (!$this->isError()) {

            $settings = $this->getSubmitted();
            $this->install->connectDb($settings['database']);
            $result = $this->install->process($settings, $this->current_route);

            if ($result['severity'] === 'success') {
                $this->line($result['message']);
            } else {
                $this->error($result['message']);
            }
        }
    }
55352
public function install()
    {
        $this->controlAccessInstall();

        if ($this->getParam()) {
            $this->validateFastInstall();
        } else {
            $this->validateWizardInstall();
        }

        $this->processInstall();
        $this->output();
    }
675387
public function execute()
    {
        $this->phpci->quiet = true;
        $this->phpci->logExecOutput(false);

        foreach ($this->directories as $dir) {
            $this->lintDirectory($dir);
        }

        $this->phpci->quiet = false;
        $this->phpci->logExecOutput(true);

        $errors = 0;
        $warnings = 0;

        foreach ($this->failedPaths as $path) {
            if ($path['type'] == 'error') {
                $errors++;
            } else {
                $warnings++;
            }
        }

        $this->build->storeMeta('phptallint-warnings', $warnings);
        $this->build->storeMeta('phptallint-errors', $errors);
        $this->build->storeMeta('phptallint-data', $this->failedPaths);

        $success = true;

        if ($this->allowed_warnings != -1 && $warnings > $this->allowed_warnings) {
            $success = false;
        }

        if ($this->allowed_errors != -1 && $errors > $this->allowed_errors) {
            $success = false;
        }

        return $success;
    }
363712
public function execute()
    {
        $path_plain      = $this->getPlainPath();
        $path_obfuscated = $this->getObfuscatedPath();
        $path_backup     = $this->getBackupPath();

        if ($this->isStopped() == true) {
            return false;
        }

        $ob = $this->getObfuscator();
        $ob->setUnpackFile('App.php');

        if ($ob->obfuscateDirectory($path_plain) == false) {
            return false;
        }

        if ($ob->makeDir($path_obfuscated) == false) {
            return false;
        }

        if($ob->saveDirectory($path_obfuscated) == false) {
            return false;
        }

        if ($this->makeBackup() == false) {
            return false;
        }

        if ($this->setupComposer() == false) {
            return false;
        }

        return true;
    }
245499
public function handle()
    {
        $this->install();

        $command = trim($this->option('command'));
        if (empty($command) === true) {
            $command = 'help';
        }

        $input = new StringInput($command);
        $output = $this->getOutput();
        $application = new \Composer\Console\Application();
        $application->setAutoExit(false);
        $application->run($input, $output);
    }