Esempio n. 1
0
 /**
  * Prompt the user and gather the input
  *
  * @param string $prompt The text of the prompt
  * @param mixed $default The default prompt string
  * @return string The input from user
  */
 public function prompt($prompt, $default = null)
 {
     Qi_Console_Std::out("\n" . $prompt);
     return Qi_Console_Std::in('fgets', $default);
 }
Esempio n. 2
0
 /**
  * Prompt the user for input
  *
  * @param string $text The text string with the prompt message
  * @return object Terminal self (to allow for chaining)
  */
 public function prompt($text)
 {
     print $text;
     return Qi_Console_Std::in();
 }