/** * Demonstrates Robo input APIs. */ public function tryInput() { $answer = $this->ask('how are you?'); $this->say('You are ' . $answer); $yes = $this->confirm('Do you want one more question?'); if (!$yes) { return Result::cancelled(); } $lang = $this->askDefault('what is your favorite scripting language?', 'PHP'); $this->say($lang); $pin = $this->askHidden('Ok, now tell your PIN code (it is hidden)'); $this->yell('Ha-ha, your pin code is: ' . $pin); $this->say('Bye!'); }