Files
hehe/vendor/league/climate/src/TerminalObject/Dynamic/Confirm.php
T
2018-08-01 16:00:05 +02:00

20 lines
328 B
PHP

<?php
namespace League\CLImate\TerminalObject\Dynamic;
class Confirm extends Input
{
/**
* Let us know if the user confirmed
*
* @return boolean
*/
public function confirmed()
{
$this->accept(['y', 'n'], true);
$this->strict();
return ($this->prompt() == 'y');
}
}