Prompts the user for input

@param  string $question
@return string
970832
public function prompt($question) {
		$question = self::format($question);
		$this->write("$question: ");
		$handle = fopen("php://stdin","r");
		
		return fgets($handle);
	}
934688
protected function ask($question)
    {
        $helper = $this->getHelper('question');
        $question = new Question("<question>{$question}</question>");

        return $helper->ask($this->input, $this->output, $question);
    }
516774
function Prompt( question, rl, answers ) {

  // Setup instance defaults property
  _.assign( this, {
    height : 0,
    status : "pending"
  });

  // Set defaults prompt options
  this.opt = _.defaults( _.clone(question), {
    validate: function() { return true; },
    filter: function( val ) { return val; },
    when: function() { return true; }
  });

  // Check to make sure prompt requirements are there
  if (!this.opt.message) {
    this.throwParamError("message");
  }
  if (!this.opt.name) {
    this.throwParamError("name");
  }

  // Normalize choices
  if ( _.isArray(this.opt.choices) ) {
    this.opt.choices = new Choices( this.opt.choices, answers );
  }

  this.rl = rl;

  return this;
}
130095
public function ask($text, $response = '')
    {
        $helper = $this->getHelper('question');
        //
        $question = new Question($this->console->question($text.' '), $response);
        //
        return $helper->ask($this->input, $this->output, $question);
    }
353539
public function ask(string $question, $default = 'n', ?array $options = null)
	{
		$options = $options === null ? ['y' => true, 'n' => false] : $this->normalizeKeys($options);

		$input = parent::ask(trim($question) . ' [' . $this->getOptions($options, $default) . '] ');

		$input = mb_strtolower(empty($input) ? $default : $input);

		if(!isset($options[$input]))
		{
			return $this->ask($question, $default, $options);
		}

		return $options[$input];
	}
331940
protected function askConfirmation($question, InputInterface $input, OutputInterface $output) {
        if (!$this->getHelperSet()->has('question')) {
            return $this->getHelper('dialog')
                ->askConfirmation($output, '<question>' . $question . '</question>', 'y');
        }

        return $this->getHelper('question')
            ->ask($input, $output, new \Symfony\Component\Console\Question\ConfirmationQuestion($question));
    }
602284
public function in($question = '')
    {
        if ($question) {
            $this->out($question, false);
        }

        return rtrim(fread(STDIN, 8192), "\n\r");
    }
493533
public function prompt($string, $default = null) {
        if ($default !== null) {
            $suffix = (string) $default;
            $question = "<question>$string</question> [<yellow>$suffix</yellow>]: ";
        } else {
            $question = "<question>$string</question>: ";
        }

        $this->output->write($question);
        $input = $this->input->readLine();

        if (strlen($input) == 0) {
            $input = $default;
        }

        if ($input === null) {
            return $this->prompt($string, $default);
        }

        return $input;
    }
852660
public static function ask(string $question, bool $default = true): bool
    {
        if (!$question = \trim($question)) {
            Show::warning('Please provide a question message!', 1);
            return false;
        }

        $defText  = $default ? 'yes' : 'no';
        $question = \ucfirst(\trim($question, '?'));
        $message  = "<comment>$question ?</comment>\nPlease confirm (yes|no)[default:<info>$defText</info>]: ";

        while (true) {
            $answer = Console::readChar($message);

            if ('' === $answer) {
                return $default;
            }

            if (0 === \stripos($answer, 'y')) {
                return true;
            }

            if (0 === \stripos($answer, 'n')) {
                return false;
            }
        }

        return false;
    }
1350997
protected function question(string $question, $default = null)
	{
		return (new Question($this->input, $this->output))->ask($question, $default);
	}
342755
public function ask($question, $default = null)
    {
        $que = new Question($question, $default);
        $helper = new SymfonyQuestionHelper();
        return $helper->ask($this->input, $this->output, $que);
    }
1222436
protected function ask($question, $default = null, Closure $validator = null)
    {
        if ($default) {
            $question .= " [$default]";
        }

        $question = new Question($question . "\n > ", $default);

        if ($validator) {
            $question->setValidator($validator);
        }

        return trim($this->getHelper('question')->ask($this->input, $this->output, $question));
    }
1064989
public function ask($question, $isHidden = false, $default = '', $displayDefault = true)
    {
        if ($displayDefault && !empty($default)) {
            $defaultText = $default;
            if (strlen($defaultText) > 30) {
                $defaultText = substr($default, 0, 30) . '...';
            }
            $question .= " [$defaultText]";
        }
        Output::write("$question ");
        return ($isHidden ? $this->askHidden() : trim(fgets(STDIN))) ?: $default;
    }
129295
public function ask($question)
    {
        //Show required message
        echo "\n";
        echo "\t", $this->colorize($question, 'info');
        echo "\n";
        //Get user input
        echo "\t"; $response = trim(fgets(STDIN));

        return $response;
    }
263917
public function prompt($str)
    {
        self::write( $str, false );
        $this->user_response = trim( fgets( $this->input, 4096 ) );
    }
610
private function choice($question, array $choices, $default, InputInterface $input, OutputInterface $output)
    {
        $helper = new QuestionHelper();

        $result = $helper->ask($input, $output, new ChoiceQuestion(
            $question,
            $choices,
            $choices[$default]
        ));

        $output->writeln('');

        return $result;
    }
403407
def ask_string(*question: Token, default: Optional[str] = None) -> Optional[str]:
    
    tokens = get_ask_tokens(question)
    if default:
        tokens.append("(%s)" % default)
    info(*tokens)
    answer = read_input()
    if not answer:
        return default
    return answer