You are here

public function SymfonyStyle::ask in Zircon Profile 8

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

Asks a question.

Parameters

string $question:

string|null $default:

callable|null $validator:

Return value

string

Overrides StyleInterface::ask

File

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

Class

SymfonyStyle
Output decorator helpers for the Symfony Style Guide.

Namespace

Symfony\Component\Console\Style

Code

public function ask($question, $default = null, $validator = null) {
  $question = new Question($question, $default);
  $question
    ->setValidator($validator);
  return $this
    ->askQuestion($question);
}