You are here

public function SymfonyStyle::askQuestion in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/console/Style/SymfonyStyle.php \Symfony\Component\Console\Style\SymfonyStyle::askQuestion()

Parameters

Question $question:

Return value

string

4 calls to SymfonyStyle::askQuestion()
SymfonyStyle::ask in vendor/symfony/console/Style/SymfonyStyle.php
Asks a question.
SymfonyStyle::askHidden in vendor/symfony/console/Style/SymfonyStyle.php
Asks a question with the user input hidden.
SymfonyStyle::choice in vendor/symfony/console/Style/SymfonyStyle.php
Asks a choice question.
SymfonyStyle::confirm in vendor/symfony/console/Style/SymfonyStyle.php
Asks for confirmation.

File

vendor/symfony/console/Style/SymfonyStyle.php, line 311

Class

SymfonyStyle
Output decorator helpers for the Symfony Style Guide.

Namespace

Symfony\Component\Console\Style

Code

public function askQuestion(Question $question) {
  if ($this->input
    ->isInteractive()) {
    $this
      ->autoPrependBlock();
  }
  if (!$this->questionHelper) {
    $this->questionHelper = new SymfonyQuestionHelper();
  }
  $answer = $this->questionHelper
    ->ask($this->input, $this, $question);
  if ($this->input
    ->isInteractive()) {
    $this
      ->newLine();
    $this->bufferedOutput
      ->write("\n");
  }
  return $answer;
}