Liip\RMT\Command\InitCommand::configure PHP Method

configure() protected method

protected configure ( )
    protected function configure()
    {
        $this->setName('init');
        $this->setDescription('Setup a new project configuration in the current directory');
        $this->setHelp('The <comment>init</comment> interactive task can be used to setup a new project');
        // Add an option to force re-creation of the config file
        $this->getDefinition()->addOption(new InputOption('force', null, InputOption::VALUE_NONE, 'Force update of the config file'));
        // Create an information collector and configure the different information request
        $this->informationCollector = new InformationCollector();
        $this->informationCollector->registerRequests(array(new InformationRequest('configonly', array('description' => 'if you want to skip creation of the RMT convenience script', 'type' => 'yes-no', 'command_argument' => true, 'interactive' => true, 'default' => 'n')), new InformationRequest('vcs', array('description' => 'The VCS system to use', 'type' => 'choice', 'choices' => array('git', 'hg', 'none'), 'choices_shortcuts' => array('g' => 'git', 'h' => 'hg', 'n' => 'none'), 'default' => 'none')), new InformationRequest('generator', array('description' => 'The generator to use for version incrementing', 'type' => 'choice', 'choices' => array('semantic-versioning', 'basic-increment'), 'choices_shortcuts' => array('s' => 'semantic-versioning', 'b' => 'basic-increment'))), new InformationRequest('persister', array('description' => 'The strategy to use to persist the current version value', 'type' => 'choice', 'choices' => array('vcs-tag', 'changelog'), 'choices_shortcuts' => array('t' => 'vcs-tag', 'c' => 'changelog'), 'command_argument' => true, 'interactive' => true))));
        foreach ($this->informationCollector->getCommandOptions() as $option) {
            $this->getDefinition()->addOption($option);
        }
    }