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";
     }
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function askAndHideAnswer($question)
 {
     $this->writeError($question, false);
     return \Seld\CliPrompt\CliPrompt::hiddenPrompt(true);
 }
Example #3
0
 /**
  * Read the line, but hide what the user is typing
  *
  * @return string
  */
 public function hidden()
 {
     return CliPrompt::hiddenPrompt();
 }