/** * Prints a string to STDOUT * * You may optionally format the string with ANSI codes by * passing additional parameters using the constants defined in [[\Leaps\Helper\Console]]. * * Example: * * ~~~ * $this->stdout('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE); * ~~~ * * @param string $string the string to print * @return int|boolean Number of bytes printed or false on error */ public function stdout($string) { if ($this->isColorEnabled()) { $args = func_get_args(); array_shift($args); $string = Console::ansiFormat($string, $args); } return Console::stdout($string); }