/** * Get a value from standard input. * * @param string $question The question you want to ask user. * * @return string The input string from standard input. * * @since 2.0 */ public function in($question = null) { $question = $question ?: $this->question; if ($question) { $this->io->out()->out($question, false); } $value = $this->io->in(); return $value; }
/** * Get a value from standard input. * * @param string $question The question you want to ask user. * * @return string The input string from standard input. * * @since 2.0 */ public function in($question = null) { $question = $question ?: $this->question; if ($question && !$this->io->getInput() instanceof NullInput) { $this->io->out()->out($question, false); } $value = $this->io->in(); return $value; }
/** * Get a value from standard input. * * @return string The input string from standard input. * * @since 2.0 */ public function in() { return $this->io->in(); }
/** * Write a string to standard error output. * * @param string $text The text to display. * @param boolean $nl True (default) to append a new line at the end of the output string. * * @return AbstractCommand Instance of $this to allow chaining. * * @since 2.0 */ public function err($text = '', $nl = true) { $this->io->err($text, $nl); return $this; }