Composer API
Class

Composer\Question\StrictConfirmationQuestion

class StrictConfirmationQuestion extends Question

Represents a yes/no question Enforces strict responses rather than non-standard answers counting as default Based on Symfony\Component\Console\Question\ConfirmationQuestion

Methods

__construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y(?:es)?$/i', string $falseAnswerRegex = '/^no?$/i')

Constructor.s

Details

at line 38
public __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y(?:es)?$/i', string $falseAnswerRegex = '/^no?$/i')

Constructor.s

Parameters

string $question The question to ask to the user
bool $default The default answer to return, true or false
string $trueAnswerRegex A regex to match the "yes" answer
string $falseAnswerRegex A regex to match the "no" answer