N98\Magento\Command\Installer\InstallCommand::configure PHP Method

configure() protected method

protected configure ( )
    protected function configure()
    {
        $this->setName('install')->addOption('magentoVersion', null, InputOption::VALUE_OPTIONAL, 'Magento version')->addOption('magentoVersionByName', null, InputOption::VALUE_OPTIONAL, 'Magento version name instead of order number')->addOption('installationFolder', null, InputOption::VALUE_OPTIONAL, 'Installation folder')->addOption('dbHost', null, InputOption::VALUE_OPTIONAL, 'Database host')->addOption('dbUser', null, InputOption::VALUE_OPTIONAL, 'Database user')->addOption('dbPass', null, InputOption::VALUE_OPTIONAL, 'Database password')->addOption('dbName', null, InputOption::VALUE_OPTIONAL, 'Database name')->addOption('dbPort', null, InputOption::VALUE_OPTIONAL, 'Database port', 3306)->addOption('dbPrefix', null, InputOption::VALUE_OPTIONAL, 'Table prefix', '')->addOption('installSampleData', null, InputOption::VALUE_OPTIONAL, 'Install sample data')->addOption('useDefaultConfigParams', null, InputOption::VALUE_OPTIONAL, 'Use default installation parameters defined in the yaml file')->addOption('baseUrl', null, InputOption::VALUE_OPTIONAL, 'Installation base url')->addOption('replaceHtaccessFile', null, InputOption::VALUE_OPTIONAL, 'Generate htaccess file (for non vhost environment)')->addOption('noDownload', null, InputOption::VALUE_NONE, 'If set skips download step. Used when installationFolder is already a Magento installation that has ' . 'to be installed on the given database.')->addOption('only-download', null, InputOption::VALUE_NONE, 'Downloads (and extracts) source code')->addOption('forceUseDb', null, InputOption::VALUE_NONE, 'If --noDownload passed, force to use given database if it already exists.')->setDescription('Install magento');
        $help = <<<HELP
* Download Magento by a list of git repos and zip files (mageplus, 
  magelte, official community packages).
* Try to create database if it does not exist.
* Installs Magento sample data if available (since version 1.2.0).
* Starts Magento installer
* Sets rewrite base in .htaccess file

Example of an unattended Magento CE 1.7.0.2 installation:

   \$ n98-magerun.phar install --dbHost="localhost" --dbUser="mydbuser" \\
     --dbPass="mysecret" --dbName="magentodb" --installSampleData=yes \\
     --useDefaultConfigParams=yes \\
     --magentoVersionByName="magento-ce-1.7.0.2" \\
     --installationFolder="magento" --baseUrl="http://magento.localdomain/"

Additionally, with --noDownload option you can install Magento working 
copy already stored in --installationFolder on the given database.

See it in action: http://youtu.be/WU-CbJ86eQc

HELP;
        $this->setHelp($help);
        $this->notEmptyCallback = function ($input) {
            if (empty($input)) {
                throw new InvalidArgumentException('Please enter a value');
            }
            return $input;
        };
    }