Configures the current command.
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.');
    }
874023
public function setup(){
		if($this->hasOption('autoinit') && $this->options()->autoinit){
			if($this->hasOption('default')){
				$this->setValue($this->options()->default);
			}else{
				$this->setValue('now');
			}
		}
	}
344069
public static function configure(Command $command)
    {
        $command->setName('migrations:list')
            ->setDescription('Prints version IDs for all available migrations ordered incrementally.')
            ->addOption(
                'newest-first',
                null,
                InputOption::VALUE_NONE,
                'Sort list in reverse order (newest first)'
            );
    }
532218
private function configureDaemonDefinition(): void
    {
        $this->addOption('run-once', null, InputOption::VALUE_NONE, 'Run the command just once.');
        $this->addOption('run-max', null, InputOption::VALUE_OPTIONAL, 'Run the command x time.');
        $this->addOption('memory-max', null, InputOption::VALUE_OPTIONAL, 'Gracefully stop running command when given memory volume, in bytes, is reached.', 0);
        $this->addOption('shutdown-on-exception', null, InputOption::VALUE_NONE, 'Ask for shutdown if an exception is thrown.');
        $this->addOption('show-exceptions', null, InputOption::VALUE_NONE, 'Display exception on command output.');
    }
519743
protected function configure()
    {

        // configure the command
        $this->addOption(InputOptionKeys::PID_FILENAME, null, InputOption::VALUE_REQUIRED, 'The explicit PID filename to use', sprintf('%s/%s', sys_get_temp_dir(), Configuration::PID_FILENAME))
             ->addOption(InputOptionKeys::INSTALLATION_DIR, null, InputOption::VALUE_REQUIRED, 'The Magento installation directory to which the files has to be imported', $installationDir = getcwd())
             ->addOption(InputOptionKeys::SYSTEM_NAME, null, InputOption::VALUE_REQUIRED, 'Specify the system name to use', gethostname())
             ->addOption(InputOptionKeys::SOURCE_DIR, null, InputOption::VALUE_REQUIRED, 'The directory that has to be watched for new files', sprintf('%s/var/importexport', $installationDir))
             ->addOption(InputOptionKeys::ENTITY_TYPE_CODE, null, InputOption::VALUE_REQUIRED, 'Specify the entity type code to use, either one of "catalog_product", "catalog_category" or "eav_attribute"')
             ->addOption(InputOptionKeys::MAGENTO_EDITION, null, InputOption::VALUE_REQUIRED, 'The Magento edition to be used, either one of "CE" or "EE"', 'CE')
             ->addOption(InputOptionKeys::CONFIGURATION, null, InputOption::VALUE_REQUIRED, 'Specify the pathname to the configuration file to use')
             ->addOption(InputOptionKeys::LOG_LEVEL, null, InputOption::VALUE_REQUIRED, 'The log level to use');
    }
961427
protected function configure()
    {
        $this
            ->setDescription('Add a token')
            ->addArgument(
                'app-name',
                InputArgument::REQUIRED,
                'App name'
            )
            ->addArgument(
                'uuid',
                InputArgument::OPTIONAL,
                'Token UUID. If none defined, a new one will be generated',
                Uuid::uuid4()->toString()
            )
            ->addOption(
                'index-name',
                null,
                InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL,
                'Indices',
                []
            )
            ->addOption(
                'endpoint',
                null,
                InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL,
                'Endpoints',
                []
            )
            ->addOption(
                'plugin',
                null,
                InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL,
                'Plugins',
                []
            )
            ->addOption(
                'ttl',
                null,
                InputOption::VALUE_OPTIONAL,
                'TTL',
                Token::DEFAULT_TTL
            );
    }
1209476
def setup(self):
        """"""

        self.allow = self.config['allow']
        self.halt = self.config['halt']
        self.skip = self.config['skip']
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.');
    }
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);

    }
137945
protected function configure()
    {
        $this->setName(static::NAME);
        $this->setDescription(static::DESCRIPTION);

        foreach ($this->defineOptions() as $option) {
            call_user_func_array([$this, 'addOption'], $option);
        }

        foreach ($this->defineArguments() as $argument) {
            call_user_func_array([$this, 'addArgument'], $argument);
        }
    }
470273
protected function configure(): void
    {
        $this->setName('project:run')
            ->setAliases(['run'])
            ->setDescription(
                'Parses and transforms the given files to a specified location'
            )
            ->setHelp(
                <<<HELP
                phpDocumentor creates documentation from PHP source files. The simplest way
                to use it is:
                
                    <info>$ phpdoc run -d [directory to parse] -t [output directory]</info>
                
                This will parse every file ending with .php, .php3 and .phtml in <directory
                to parse> and then output a HTML site containing easily readable documentation
                in <output directory>.
                
                phpDocumentor will try to look for a phpdoc.dist.xml or phpdoc.xml file in your
                current working directory and use that to override the default settings if
                present. In the configuration file can you specify the same settings (and
                more) as the command line provides.
                
                <comment>Other commands</comment>
                In addition to this command phpDocumentor also supports additional commands:
                
                <comment>Available commands:</comment>
                <info>  help
                  list
                  parse
                  run
                  transform
                <comment>project</comment>
                  project:parse
                  project:run
                  project:transform
                <comment>template</comment>
                  template:generate
                  template:list
                  template:package</info>
                
                You can get a more detailed listing of the commands using the <info>list</info>
                command and get help by prepending the word <info>help</info> to the command
                name.
HELP
            )
            ->addOption(
                'target',
                't',
                InputOption::VALUE_OPTIONAL,
                'Path where to store the generated output'
            )
            ->addOption(
                'cache-folder',
                null,
                InputOption::VALUE_OPTIONAL,
                'Path where to store the cache files'
            )
            ->addOption(
                'filename',
                'f',
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of files to parse. The wildcards ? and * are supported'
            )
            ->addOption(
                'directory',
                'd',
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of directories to (recursively) parse'
            )
            ->addOption(
                'encoding',
                null,
                InputOption::VALUE_OPTIONAL,
                'encoding to be used to interpret source files with'
            )
            ->addOption(
                'extensions',
                null,
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of extensions to parse, defaults to php, php3 and phtml'
            )
            ->addOption(
                'ignore',
                'i',
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of file(s) and directories (relative to the source-code directory) that will be '
                . 'ignored. Wildcards * and ? are supported'
            )
            ->addOption(
                'ignore-tags',
                null,
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of tags that will be ignored, defaults to none. package, subpackage and ignore '
                . 'may not be ignored.'
            )
            ->addOption(
                'hidden',
                null,
                InputOption::VALUE_NONE,
                'Use this option to tell phpDocumentor to parse files and directories that begin with a period (.), '
                . 'by default these are ignored'
            )
            ->addOption(
                'ignore-symlinks',
                null,
                InputOption::VALUE_NONE,
                'Ignore symlinks to other files or directories, default is on'
            )
            ->addOption(
                'markers',
                'm',
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Comma-separated list of markers/tags to filter'
            )
            ->addOption(
                'title',
                null,
                InputOption::VALUE_OPTIONAL,
                'Sets the title for this project; default is the phpDocumentor logo'
            )
            ->addOption(
                'force',
                null,
                InputOption::VALUE_NONE,
                'Forces a full build of the documentation, does not increment existing documentation'
            )
            ->addOption(
                'validate',
                null,
                InputOption::VALUE_NONE,
                'Validates every processed file using PHP Lint, costs a lot of performance'
            )
            ->addOption(
                'visibility',
                null,
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Specifies the parse visibility that should be displayed in the documentation (comma separated e.g. '
                . '"public,protected")'
            )
            ->addOption(
                'defaultpackagename',
                null,
                InputOption::VALUE_OPTIONAL,
                'Name to use for the default package.',
                'Default'
            )
            ->addOption(
                'sourcecode',
                null,
                InputOption::VALUE_NONE,
                'Whether to include syntax highlighted source code'
            )
            ->addOption(
                'template',
                null,
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
                'Name of the template to use (optional)'
            )
            ->addOption(
                'parseprivate',
                null,
                InputOption::VALUE_NONE,
                'Whether to parse DocBlocks marked with @internal tag'
            );

        parent::configure();
    }
116067
protected function configure()
    {
        $this->setName(self::COMMAND_NAME);
        $this->setDescription('Export settings from "core_config_data" into a file');
        $this->addOption('format', 'm', InputOption::VALUE_OPTIONAL, 'Format: yaml, json', 'yaml');
        $this->addOption('hierarchical', 'a', InputOption::VALUE_OPTIONAL, 'Create a hierarchical or a flat structure (not all export format supports that). Enable with: y', 'n');
        $this->addOption('filename', 'f', InputOption::VALUE_OPTIONAL, 'File name into which should the export be written. Defaults into var directory.');
        $this->addOption('include', 'i', InputOption::VALUE_OPTIONAL, 'Path prefix, multiple values can be comma separated; exports only those paths');
        $this->addOption('includeScope', null, InputOption::VALUE_OPTIONAL, 'Scope name, multiple values can be comma separated; exports only those scopes');
        $this->addOption('exclude', 'x', InputOption::VALUE_OPTIONAL, 'Path prefix, multiple values can be comma separated; exports everything except ...');
        $this->addOption('filePerNameSpace', 's', InputOption::VALUE_OPTIONAL, 'Export each namespace into its own file. Enable with: y', 'n');

        parent::configure();
    }
532651
protected function configure()
    {
        parent::configure();
        $this
            ->addOption(
                'oldstore',
                null,
                InputOption::VALUE_OPTIONAL,
                'Environment Location Storage to Migrate',
                self::BASH_VAGRANT_TRANSIENT_STORE
            );
    }
1072239
protected function configure()
    {
        $this
            ->addOption(
                'target',
                't',
                InputOption::VALUE_OPTIONAL,
                'target location for output',
                'build'
            )
            ->addOption(
                'input-format',
                'i',
                InputOption::VALUE_OPTIONAL,
                'which input format does the documentation sources have?',
                'rst'
            )
            ->addOption(
                'title',
                null,
                InputOption::VALUE_OPTIONAL,
                'The title of this document',
                'Scrybe'
            )
            ->addOption(
                'template',
                null,
                InputOption::VALUE_OPTIONAL,
                'which template should be used to generate the documentation?',
                'default'
            )
            ->addArgument(
                'source',
                InputArgument::IS_ARRAY | InputArgument::REQUIRED,
                'One or more files or directories to fetch files from'
            );

        $this->setHelp(
            <<<DESCRIPTION
Generates reference documentation as {$this->output_format}.

You can define the type of files use as input using the <info>--input-format</info>
of <info>-i</info> option.

DESCRIPTION
        );
    }
845802
def setCmdline(self,value=1):
        """"""
        # set through dictionary to avoid extra calls to __setattr__
        if value:
            self.__dict__['flags'] = self.flags | _cmdlineFlag
        else:
            self.__dict__['flags'] = self.flags & ~_cmdlineFlag
996154
protected function configure()
    {
        $command = new ConsoleCommand();

        $command->name($this->commandName)
                ->description($this->commandDescription);

        if ($this->argument != null) {
            $command->argument([
                'name'        => $this->argument,
                'description' => $this->argumentDescription,
                'type'        => $this->argumentType,
            ]);
        }
        $this->configureCommand($command);
    }
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