bundle/Command/InstallCommand.php
protected function askForData($optionIdentifier, $optionName, $defaultValue, $validator = null)
    {
        $optionValue = $this->input->getOption($optionIdentifier);
        $optionValue = !empty($optionValue) ? $optionValue :
            $defaultValue;

        $question = $this->getQuestion($optionName, $optionValue, $validator);
        $optionValue = $this->questionHelper->ask(
            $this->input,
            $this->output,
            $question
        );

        $this->input->setOption($optionIdentifier, $optionValue);

        return $optionValue;
    }
protected function askForData($optionIdentifier, $optionName, $defaultValue, $validator = null)
    {
        $optionValue = $this->input->getOption($optionIdentifier);
        $optionValue = !empty($optionValue) ? $optionValue :
            $defaultValue;

        $question = $this->getQuestion($optionName, $optionValue, $validator);
        $optionValue = $this->questionHelper->ask(
            $this->input,
            $this->output,
            $question
        );

        $this->input->setOption($optionIdentifier, $optionValue);

        return $optionValue;
    }
protected function askForData ( $ optionIdentifier , $ optionName , $ defaultValue , $ validator = null ) { $ optionValue = $ this -> input -> getOption ( $ optionIdentifier ) ; $ optionValue = ! empty ( $ optionValue ) ? $ optionValue : $ defaultValue ; $ question = $ this -> getQuestion ( $ optionName , $ optionValue , $ validator ) ; $ optionValue = $ this -> questionHelper -> ask ( $ this -> input , $ this -> output , $ question ) ; $ this -> input -> setOption ( $ optionIdentifier , $ optionValue ) ; return $ optionValue ; }
Asks a question that fills provided option.

@param string $optionIdentifier
@param string $optionName
@param string $defaultValue
@param callable $validator

@return string
Asks a question that fills provided option .