function TestFunction()
 {
     echo "Are you KP? (yes/no)";
     $answer = \Seld\CliPrompt\CliPrompt::prompt();
     if ($answer == "yes") {
         echo "Happy birthday!\n";
     } else {
         echo "Screw you :)\n";
     }
 }
示例#2
0
 /**
  * {@inheritDoc}
  */
 public function askAndHideAnswer($question)
 {
     $this->writeError($question, false);
     return \Seld\CliPrompt\CliPrompt::hiddenPrompt(true);
 }
示例#3
0
 /**
  * Read the line, but hide what the user is typing
  *
  * @return string
  */
 public function hidden()
 {
     return CliPrompt::hiddenPrompt();
 }