/** * Write a string to standard 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 out($text = '', $nl = true) { $quiet = $this->app ? $this->app->get('quiet', false) : false; if (!$quiet) { $this->io->out($text, $nl); } return $this; }
/** * 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; }
/** * Write a string to standard 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 static Instance of $this to allow chaining. * * @since 2.0 */ public function out($text = '', $nl = true) { $this->io->out($text, $nl); return $this; }