Configures the current command.
420342
protected function configure()
    {
        $this->setName('phpjunitmerge')
            ->setDefinition(
                array(
                    new InputArgument(
                        'dir',
                        InputArgument::REQUIRED,
                        'Directory where all files ready to get merged are stored'
                    ),
                    new InputArgument(
                        'file',
                        InputArgument::REQUIRED,
                        'The target file in which the merged result should be written'
                    )
                )
            )
            ->addOption(
                'names',
                null,
                InputOption::VALUE_REQUIRED,
                'A comma-separated list of file names to check',
                '*.xml'
            )
            ->addOption(
                'ignore',
                null,
                InputOption::VALUE_REQUIRED,
                'A comma-separated list of file names to ignore',
                'result.xml'
            )
			->addOption(
				'no-suffix',
				null,
				InputOption::VALUE_NONE,
				'Do not add suffix for test suites with duplicate names',
				null
			);
    }
242642
protected function configure()
    {
        $this->setName(self::COMMAND_NAME);
        $this->setDescription('Checks the style of commit messages');

        $help = '';
        $help .= "Check your commit messages to ensure they follow the guidelines described by Chris Beams.\n";
        $help .= "To enable the Git hook in your project run 'composer install-git-hook.'\n";
        $help .= "\n";
        $help .= "\n";
        $help .= "Here are some good articles on commit message style:\n";
        $help .= "\n";
        $help .= "* http://chris.beams.io/posts/git-commit/\n";
        $help .= "* https://git-scm.com/book/ch5-2.html#Commit-Guidelines\n";
        $help .= "* https://github.com/blog/926-shiny-new-commit-styles\n";

        $this->setHelp($help);
        $this->setDefinition(
            new InputDefinition(
                [
                    new InputArgument(
                        self::ARGUMENT_COMMIT_MESSAGE_FILE,
                        InputArgument::REQUIRED,
                        'Path to commit message file'
                    ),
                    new InputOption(
                        self::OPTION_IGNORE,
                        ['i'],
                        InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL,
                        'Ignore a commit message that matches this pattern and don\'t test it',
                        ['/^Merge branch/']
                    ),
                    new InputOption(
                        self::OPTION_COMMENT_CHAR,
                        ['c'],
                        InputOption::VALUE_OPTIONAL,
                        'Ignore lines that are prefixed with this character',
                        '#'
                    ),
                ]
            )
        );
    }
286601
protected function configure() : void
    {
        $this->setName('install')
             ->setDescription('Install git hooks')
             ->setHelp('This command will install the git hooks to your .git directory')
             ->addArgument('hook', InputArgument::OPTIONAL, 'Hook you want to install')
             ->addOption(
                 'configuration',
                 'c',
                 InputOption::VALUE_OPTIONAL,
                 'Path to your json configuration',
                 getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG
             )->addOption('force', 'f', InputOption::VALUE_NONE, 'Force to overwrite existing hooks')
             ->addOption(
                 'git-directory',
                 'g',
                 InputOption::VALUE_OPTIONAL,
                 'Path to your .git directory',
                 getcwd() . DIRECTORY_SEPARATOR . '.git'
             );
    }
383153
protected function cmdRefresh() /*: void*/
    {
        /**
         * @see simplecomplex_config_cli()
         */
        $container = Dependency::container();
        // Validate input. ---------------------------------------------
        $store = '';
        if (empty($this->command->arguments['store'])) {
            $this->command->inputErrors[] = !isset($this->command->arguments['store']) ? 'Missing \'store\' argument.' :
                'Empty \'store\' argument.';
        } else {
            $store = $this->command->arguments['store'];
            if (!ConfigKey::validate($store)) {
                $this->command->inputErrors[] = 'Invalid \'store\' argument.';
            }
        }
        $allow_none = !empty($this->command->options['allow-none']);
        $verbose = !empty($this->command->options['verbose']);
        // Pre-confirmation --yes/-y ignored for this command.
        if ($this->environment->riskyCommandRequireConfirm && $this->command->preConfirmed) {
            $this->command->inputErrors[] = 'Pre-confirmation \'yes\'/-y option not supported for this command,'
                . "\n" . 'unless env var PHP_LIB_SIMPLECOMPLEX_UTILS_CLI_SKIP_CONFIRM'
                . "\n" . 'or .risky_command_skip_confirm file in document root.';
        }
        if ($this->command->inputErrors) {
            foreach ($this->command->inputErrors as $msg) {
                $this->environment->echoMessage(
                    $this->environment->format($msg, 'hangingIndent'),
                    'notice'
                );
            }
            // This command's help text.
            $this->environment->echoMessage("\n" . $this->command);
            exit;
        }
        // Display command and the arg values used.---------------------
        if ($this->environment->riskyCommandRequireConfirm || !$this->command->preConfirmed) {
            $this->environment->echoMessage(
                $this->environment->format(
                    $this->environment->format($this->command->name, 'emphasize')
                    . "\n" . 'store: ' . $store,
                    'hangingIndent'
                )
            );
        }
        // Request confirmation, ignore --yes/-y pre-confirmation option;
        // unless .risky_command_skip_confirm file placed in document root.
        if ($this->environment->riskyCommandRequireConfirm) {
            if (!$this->environment->confirm(
                'Refresh that config store? Type \'yes\' to continue:',
                ['yes'],
                '',
                'Aborted refreshing config store.'
            )) {
                exit;
            }
        } elseif (!$this->command->preConfirmed && !$this->environment->confirm(
                'Refresh that config store? Type \'yes\' or \'y\' to continue:',
                ['yes', 'y'],
                '',
                'Aborted refreshing config store.'
            )) {
            exit;
        }
        // Check if the command is doable.------------------------------
        // Nothing to check here.
        if ($store == 'global' && $container->has('config')) {
            /** @var IniSectionedConfig $config_store */
            $config_store = $container->get('config');
        } else {
            $config_class = static::CLASS_CONFIG;
            /** @var IniSectionedConfig $config_store */
            $config_store = new $config_class($store);
        }
        // Do it.
        if (!$config_store->refresh($allow_none, $verbose)) {
            $this->environment->echoMessage('Failed to refresh config store[' . $store . '].', 'error');
        } elseif (!$this->command->silent) {
            $this->environment->echoMessage('Refreshed config store[' . $store . '].', 'success');
        }
        exit;
    }
589731
protected function configure(): void
    {
        $this->setName('schedule:run')
            ->setDescription('Starts the event runner.')
            ->setDefinition(
                [
                    new InputArgument(
                        'source',
                        InputArgument::OPTIONAL,
                        'The source directory for collecting the task files.',
                        $this->configuration
                            ->getSourcePath()
                    ),
                ]
            )
            ->addOption(
                'force',
                'f',
                InputOption::VALUE_NONE,
                'Run all tasks regardless of configured run time.'
            )
            ->addOption(
                'task',
                't',
                InputOption::VALUE_REQUIRED,
                'Which task to run. Provide task number from <info>schedule:list</info> command.',
                null
            )
           ->setHelp('This command starts the Crunz event runner.');
    }
100868
protected function configure()
    {
        parent::configure();
        $this->setDescription('Flush the cache. If the boost mode is active, all pages are recrawlt.');
        $this->addArgument('force-boost-mode-flush', InputArgument::OPTIONAL, 'Force a boost mode flush', false);
    }
1098049
protected function defArgConfigure(): void
    {
        $this->createDefinition()
            ->setDescription('the command arg/opt config use defined configure, it like symfony console: argument define by position')
            ->addArgument('name', Input::ARG_REQUIRED, "description for the argument 'name'")
            ->addOption('yes', 'y', Input::OPT_BOOLEAN, "description for the option 'yes'")
            ->addOption('opt1', null, Input::OPT_REQUIRED, "description for the option 'opt1'");
    }
425496
function process(){
		if (!conf.configured) that.configure();
		var args = command.args.slice(0);
		for(var i in args){
			var arg = args[i];
			if(conf.regexp.test(arg)){
				var catchWord = RegExp.$2;
				switch(RegExp.$1){
					case '-': 
						processShortKey(catchWord, i, args);
						break;
					case '--':
						processKey(catchWord, i, args);
						break;
				}
			} else {
				addArgument(arg);
			}
		}
		conf.processed = true
	}
1006016
@Override
    protected void configure() {

        // Run request processor first so give it a high rank
        bind(RequestProcessor.class).to(VertxRequestProcessor.class).ranked(999);
        // Run response processor last so give it a low rank
        bind(ResponseProcessor.class).to(VertxResponseProcessor.class).ranked(-999);
        // Run post response processor last so give it a low rank
        bind(PostResponseProcessor.class).to(VertxPostResponseProcessor.class).ranked(-999);

    }
638575
protected function configure()
    {
        $this->setName($this->name);
        $this->setDescription($this->description);

        foreach ($this->arguments as $argument) {
            $this->getDefinition()->addArgument($argument);
        }

        foreach ($this->options as $option) {
            $this->getDefinition()->addOption($option);
        }
    }
1213080
public static function configure()
    {
        static $configured = false;
        if (!$configured) {
            register_shutdown_function(array('Aoe_Scheduler_Helper_GracefulDead', 'beforeDyingShutdown'));
            if (extension_loaded('pcntl') && function_exists('pcntl_signal')) {
                declare(ticks = 1);
                pcntl_signal(SIGINT, array('Aoe_Scheduler_Helper_GracefulDead', 'beforeDyingSigint')); // CTRL + C
                pcntl_signal(SIGTERM, array('Aoe_Scheduler_Helper_GracefulDead', 'beforeDyingSigterm')); // kill <pid>
            }
            $configured = true;
        }
    }
573884
protected function configure()
    {
        $this
            ->setName('chill:main:languages:populate')
            ->setDescription('Load or update languages in db. This command does not delete existing '.
                'languages, but will update names according to available languages')
            ->addOption(
                    self::INCLUDE_REGIONAL_VERSION,
                    null,
                    InputOption::VALUE_NONE,
                    'Include the regional languages. The regional languages are languages with code containing _ excepted '
                        . implode(',', $this->regionalVersionToInclude) . '.')
            ->addOption(
                    self::INCLUDE_ANCIENT,
                    null,
                    InputOption::VALUE_NONE,
                    'Include the ancient languages that are languages with code '
                        . implode(', ', $this->ancientToExclude) . '.')
            ;
    }
171035
protected function configure()
    {
        $this->addArgument(
            'command-to-run',
            InputArgument::REQUIRED,
            'Command to run'
        );
        $this->addOption(
            'log',
            null,
            Option::VALUE_REQUIRED,
            'Log to file'
        );
        $this->addOption(
            'stage',
            null,
            Option::VALUE_REQUIRED,
            'Stage to deploy'
        );
        $this->addOption(
            'roles',
            null,
            Option::VALUE_REQUIRED,
            'Roles to deploy'
        );
        $this->addOption(
            'hosts',
            null,
            Option::VALUE_REQUIRED,
            'Host to deploy, comma separated, supports ranges [:]'
        );
    }
500188
protected function configure(): void
    {
        $this
            ->setName('make:model')
            ->setDescription('Creates a new App model')
            ->addArgument(
                'modelName',
                InputArgument::OPTIONAL,
                'Define the name of the model to create'
            )
            ->addOption(
                'skip-db',
                null,
                InputOption::VALUE_NONE,
                'Skip database table creation'
            )
            ->addOption(
                'skip-seeder',
                null,
                InputOption::VALUE_NONE,
                'Skip seeder creation'
            )
            ->addOption(
                'auto-detect',
                null,
                InputOption::VALUE_NONE,
                'Automatically build models from the database'
            )
            ->addOption(
                'localised',
                null,
                InputOption::VALUE_NONE,
                'Create a localised model (or convert an existing model)'
            );

        if (Components::exists('nails/module-admin')) {
            $this->addOption(
                'admin',
                null,
                InputOption::VALUE_NONE,
                'Create an admin controller'
            );
        }
    }
455770
protected function setConfiguration()
    {
        $this->setDescription($this->description);
        $this->configureArguments($this->arguments, 'addArgument');
        $this->configureArguments($this->options);
    }
1051727
protected function setupExecution() {
    $this->setOptionsForLastCommand();
    $this->setGlobalOptions();

    $globalOptions = $this->arguments;

    foreach ($this->commands as $commandNumber => $command) {
      if ($this->alias) {
        $command = "@{$this->alias} {$command}";
      }

      $options = isset($this->options[$commandNumber]) ? $this->options[$commandNumber] : '';

      // Add in global options, as well as those set via option method.
      $command = $command . $options . $globalOptions;

      $this->exec($command)
        ->dir($this->dir);
    }
  }
501236
protected function configure()
    {

        $filesystemAdapterNames = $this->mountManager->getFilesystemPrefixes();
        $this->setName('filesystem:sync')
            ->addArgument(
                'source',
                InputArgument::REQUIRED,
                "Source path in the format {adapter}://{path}.\nAvailable Adapters: <comment>" . implode(
                    ', ',
                    $filesystemAdapterNames
                )
                . '</comment>'
            )
            ->addArgument(
                'destination',
                InputArgument::REQUIRED,
                "Destination path in the format {adapter}://{path}.\nAvailable Adapters: <comment>" . implode(
                    ', ',
                    $filesystemAdapterNames
                )
                . '</comment>'
            )
            ->addOption(
                'delete',
                null,
                InputOption::VALUE_NONE,
                'Delete files in destination filesystem that do not exist in source'
            )
            ->addOption(
                'ignore-timestamps',
                null,
                InputOption::VALUE_NONE,
                'Push all files, even if a newer matching file exists on the destination'
            )
            ->addOption(
                'exclude',
                null,
                InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
                'Path to exclude, in rsync format'
            )
            ->addOption(
                'include',
                null,
                InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
                'Excluded path to include, in rsync format'
            )
            ->addOption(
                'batch-size',
                null,
                InputOption::VALUE_REQUIRED,
                'Batch size for copy and delete operations',
                100
            )
            ->setDescription(
                'Copy a directory from a source filesystem directory to a destination filesystem directory.'
            )
            ->setHelp(
                "This command copies a directory from a source filesystem directory to a destination filesystem directory."
            );
    }