Symfony\Component\Console\Helper\DialogHelper::validateAttempts
Validate an attempt
Signature
Parameters
$interviewer
—
object
- A callable that will ask for a question and return the result
$output
—
Symfony\Component\Console\Output\OutputInterface
- An Output instance
$validator
—
object
- A PHP callback
$attempts
—
integer
- Max number of times to ask before giving up ; false will ask infinitely
Returns
- string
- The validated response
Errors/Exceptions
-
Exception
- In case the max number of attempts has been reached and no valid response has been given