Ejemplo n.º 1
0
/**
 * Presents a user with a multiple choice question, useful for 'yes/no' type
 * questions (which this function defaults too).
 *
 * @param string  $question  The question to ask the user.
 * @param string  $valid     A string of characters allowed as a response. Case
 *                           is ignored.
 * @param string  $default   The default choice. NULL if a default is not allowed.
 * @return string  The users choice.
 * @see cli\prompt()
 */
function choose($question, $choice = 'yn', $default = 'n')
{
    return \cli\Streams::choose($question, $choice, $default);
}