public function confirm($questionText, $default = true)
{
$questionText .= ' <question>' . ($default ? '[Y/n]' : '[y/N]') . '</question> ';
$yes = $this->input->hasOption('yes') && $this->input->getOption('yes');
$no = $this->input->hasOption('no') && $this->input->getOption('no');
if ($yes && !$no) {
$this->output->writeln($questionText . 'y');
return true;
} elseif ($no && !$yes) {
$this->output->writeln($questionText . 'n');
return false;
}
$question = new ConfirmationQuestion($questionText, $default);
return $this->ask($this->input, $this->output, $question);
}