Airship\Engine\Continuum\Installers\Cabin::install PHP Method

install() public method

1. Extract files to proper directory. 2. Run the update triggers (install hooks and incremental upgrades) 3. Create/update relevant configuration files. 4. Create symbolic links. 5. Clear the cache files.
public install ( InstallFile $fileInfo ) : boolean
$fileInfo InstallFile
return boolean
    public function install(InstallFile $fileInfo) : bool
    {
        $ns = $this->makeNamespace($this->supplier->getName(), $this->package);
        $alias = 'cabin.' . $this->supplier->getName() . '.' . $this->package . '.phar';
        $updater = new \Phar($fileInfo->getPath(), \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::KEY_AS_FILENAME);
        $updater->setAlias($alias);
        $metadata = $updater->getMetadata();
        // Overwrite files
        $updater->extractTo(ROOT . '/Cabin/' . $ns);
        // Run the update trigger.
        $updateTrigger = ROOT . '/Cabin/' . $ns . '/update_trigger.php';
        if (\file_exists($updateTrigger)) {
            /**
             * @security Make sure arbitrary RCE isn't possible here.
             */
            \shell_exec('php -dphar.readonly=0 ' . \escapeshellarg($updateTrigger) . ' >/dev/null 2>&1 &');
        }
        // Free up the updater alias
        $garbageAlias = Base64UrlSafe::encode(\random_bytes(33)) . '.phar';
        $updater->setAlias($garbageAlias);
        unset($updater);
        self::$continuumLogger->store(LogLevel::INFO, 'Cabin install successful', $this->getLogContext($fileInfo));
        return $this->configure($ns, $metadata);
    }