Configures the current command.
331276
protected function configure()
    {
        $this
            ->setDescription('Make a query')
            ->addArgument(
                'app-name',
                InputArgument::REQUIRED,
                'App name'
            )
            ->addArgument(
                'index-name',
                InputArgument::REQUIRED,
                'Index name'
            )
            ->addArgument(
                'query',
                InputArgument::OPTIONAL,
                'Query text',
                ''
            )
            ->addOption(
                'page',
                null,
                InputOption::VALUE_OPTIONAL,
                'Page',
                ModelQuery::DEFAULT_PAGE
            )
            ->addOption(
                'size',
                null,
                InputOption::VALUE_OPTIONAL,
                'Number of results',
                ModelQuery::DEFAULT_SIZE
            )
            ->addOption(
                'parameter',
                null,
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Query parameters',
                []
            );
    }
316342
protected function configure()
    {
        $this
            ->setName('detect')
            ->setDefinition(
                [
                    new InputArgument('path', InputArgument::OPTIONAL, 'path of the project', null),
                    new InputOption(
                        'config-file',
                        'c',
                        InputOption::VALUE_REQUIRED,
                        'File path of the configuration file'
                    ),
                    new InputOption(
                        'format',
                        'f',
                        InputOption::VALUE_REQUIRED,
                        sprintf('Output format (%s)', implode(', ', $this->formats)),
                        $this->formats[0]
                    ),
                ]
            )
            ->setDescription('Detect coupling rules')
            ->setHelp($this->loadHelpContent());
    }
350215
protected function setCommand($command)
    {
        $this->command = $command;

        if (!is_null($this->loader)) {
            $this->loader->setCommand($this->command);
        }
    }
1105702
protected function configureId()
    {
        $this->id = sprintf(
            $this->options['id_format'],
            $this->options['server_name'],
            $this->options['pid'],
            implode(',', $this->queues)
        );
    }
1137517
protected function configure()
        {

            // get systemname
            $sAppName = SystemSettings::get('app_name');

            // set cli options
            $this->setName($sAppName . ':remote:cron')->addOption('app', null, InputOption::VALUE_REQUIRED, 'run only for specific remote app', false)->addOption('force', null, InputOption::VALUE_NONE, 'force to run remote app / ignore cron settings')->setDescription('Run/Crawl registered remote apps');
        }
576149
def set_current(self, current):
        
        self.current = current
        self.input = current.input
        # self.req = current.request
        # self.resp = current.response
        self.output = current.output
        self.cmd = current.task_data['cmd']

        if self.cmd and NEXT_CMD_SPLITTER in self.cmd:
            self.cmd, self.next_cmd = self.cmd.split(NEXT_CMD_SPLITTER)
        else:
            self.next_cmd = None
278397
protected function configure()
    {
        $this->setName('springbot:queue:enqueue')
            ->setDescription('Enqueue Job')
            ->addArgument(self::CLASS_ARGUMENT, InputArgument::REQUIRED)
            ->addArgument(self::METHOD_ARGUMENT, InputArgument::REQUIRED)
            ->addArgument(self::QUEUE_ARGUMENT, null, '', 'default')
            ->addArgument(self::PRIORITY_ARGUMENT, null, '', 1)
            ->addArgument(self::PARAMS_ARGUMENT, InputArgument::IS_ARRAY);
    }
856502
protected function configure()
  {
    parent::configure();

    $this
        ->addOption(
            'host',
            NULL,
            InputOption::VALUE_OPTIONAL,
            'The host address to serve the application on.',
            'localhost'
            )
        ->addOption(
            'docroot',
            NULL,
            InputOption::VALUE_OPTIONAL,
            'Specify an explicit document root.',
            FALSE
        )
        ->addOption(
            'port',
            NULL,
            InputOption::VALUE_OPTIONAL,
            'The port to serve the application on.',
            8000
        );
  }
686862
protected function configure()
    {
        $this->setName(self::COMMAND_NAME);
        $this->setDescription('Import "core_config_data" settings for an environment');
        $this->addArgument('folder', InputArgument::REQUIRED, 'Import folder name');
        $this->addArgument('environment', InputArgument::REQUIRED, 'Environment name. SubEnvs separated by slash e.g.: development/osx/developer01');
        $this->addOption('base', null, InputOption::VALUE_OPTIONAL, 'Base folder name', 'base');
        $this->addOption('format', 'm', InputOption::VALUE_OPTIONAL, 'Format: yaml, json (Default: yaml)', 'yaml');

        parent::configure();
    }
488074
public function command()
    {
        $cmd = func_get_args();

        if (strpos($cmd[0], 'plugin.') === 0) {
            $this->callbacks[] = $cmd;
        }
        else {
            $this->commands[] = $cmd;
        }
    }
494681
protected function configure(): void
    {
        $this
            ->setName('make:task')
            ->setDescription('Generates a task file with one task.')
            ->setDefinition(
                [
                    new InputArgument(
                        'taskfile',
                        InputArgument::REQUIRED,
                        'The task file name'
                    ),
                    new InputOption(
                        'frequency',
                        'f',
                        InputOption::VALUE_OPTIONAL,
                        "The task's frequency",
                        self::DEFAULTS['frequency']
                    ),
                    new InputOption(
                        'constraint',
                        'c',
                        InputOption::VALUE_OPTIONAL,
                        "The task's constraint",
                        self::DEFAULTS['constraint']
                    ),
                    new InputOption(
                        'in',
                        'i',
                        InputOption::VALUE_OPTIONAL,
                        "The command's path",
                        self::DEFAULTS['in']
                    ),
                    new InputOption(
                        'run',
                        'r',
                        InputOption::VALUE_OPTIONAL,
                        "The task's command",
                        self::DEFAULTS['run']
                    ),
                    new InputOption(
                        'description',
                        'd',
                        InputOption::VALUE_OPTIONAL,
                        "The task's description",
                        self::DEFAULTS['description']
                    ),
                    new InputOption(
                        'type',
                        't',
                        InputOption::VALUE_OPTIONAL,
                        'The task type',
                        self::DEFAULTS['type']
                    ),
                ]
            )
            ->setHelp('This command makes a task file skeleton.');
    }
772059
protected function configureIO()
	{
		if ($this->consoleInput->hasParameterOption(['--ansi'], true))
		{
			$this->consoleOutput->setDecorated(true);
		}
		elseif ($this->consoleInput->hasParameterOption(['--no-ansi'], true))
		{
			$this->consoleOutput->setDecorated(false);
		}

		if ($this->consoleInput->hasParameterOption(['--no-interaction', '-n'], true))
		{
			$this->consoleInput->setInteractive(false);
		}

		if ($this->consoleInput->hasParameterOption(['--quiet', '-q'], true))
		{
			$this->consoleOutput->setVerbosity(OutputInterface::VERBOSITY_QUIET);
			$this->consoleInput->setInteractive(false);
		}
		else
		{
			if ($this->consoleInput->hasParameterOption('-vvv', true)
				|| $this->consoleInput->hasParameterOption('--verbose=3', true)
				|| $this->consoleInput->getParameterOption('--verbose', false, true) === 3
			)
			{
				$this->consoleOutput->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
			}
			elseif ($this->consoleInput->hasParameterOption('-vv', true)
				|| $this->consoleInput->hasParameterOption('--verbose=2', true)
				|| $this->consoleInput->getParameterOption('--verbose', false, true) === 2
			)
			{
				$this->consoleOutput->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE);
			}
			elseif ($this->consoleInput->hasParameterOption('-v', true)
				|| $this->consoleInput->hasParameterOption('--verbose=1', true)
				|| $this->consoleInput->hasParameterOption('--verbose', true)
				|| $this->consoleInput->getParameterOption('--verbose', false, true)
			)
			{
				$this->consoleOutput->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
			}
		}
	}
1031443
private function configure(): void
    {
        $services = array_keys($this->container->findTaggedServiceIds('app.service'));
        foreach ($services as $service) {
            $service = $this->container->get($service);
            $this->services[$service->getName()] = $service;
        }
    }
158126
protected function configure()
    {
        $this->basePath = getcwd();
        $this->projectName = basename($this->basePath);
        $this->defaultName = $this->slug($this->projectName);

        $this
            ->setName('make')
            ->setDescription('Install Artestead into the current project')
            ->addOption('type', null, InputOption::VALUE_REQUIRED, 'Type of hosting: drupal, laravel, symfony, wordpress') // New
            ->addOption('name', null, InputOption::VALUE_OPTIONAL, 'The name of the virtual machine.', $this->defaultName)
            ->addOption('hostname', null, InputOption::VALUE_OPTIONAL, 'The hostname of the virtual machine.', str_replace('.local.local', '.local', "www.{$this->projectName}.local"))
            ->addOption('ip', null, InputOption::VALUE_OPTIONAL, 'The IP address of the virtual machine.')
            ->addOption('after', null, InputOption::VALUE_NONE, 'Determines if the after.sh file is created.')
            ->addOption('aliases', null, InputOption::VALUE_NONE, 'Determines if the aliases.sh file is created.')
            ->addOption('example', null, InputOption::VALUE_NONE, 'Determines if a Artestead example file is created.')
            ->addOption('json', null, InputOption::VALUE_NONE, 'Determines if the Artestead settings file will be in json format.');
    }
1101666
protected function configure()
    {
        $this->setName('db:reset')
        ->setDescription('Resets all changes to database');

        // $this->_config = Config::getInstance('database');
        $this->_config = new Configuration();
        $this->_config = $this->_config->from('database');
    }
70743
protected function configure(): void
    {
        // eg. IndexConfigure() for indexCommand()
        $method = $this->action . 'Configure';

        if (\method_exists($this, $method)) {
            $this->$method();
        }
    }
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;
    }