Trait lajax\projectscanner\ConsoleOutputTrait
| Implemented by | lajax\projectscanner\Scanner |
|---|---|
| Available since version | 1.0 |
Prints a string to console.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| isColorEnabled() | Returns a value indicating whether ANSI color is enabled. | lajax\projectscanner\ConsoleOutputTrait |
| stderr() | Prints a string to STDERR | lajax\projectscanner\ConsoleOutputTrait |
| stdout() | Prints a string to STDOUT | lajax\projectscanner\ConsoleOutputTrait |
Method Details
Returns a value indicating whether ANSI color is enabled.
| public boolean isColorEnabled ( $stream = STDOUT ) | ||
| $stream | resource | The stream to check. |
| return | boolean | Whether to enable ANSI style in output. |
|---|---|---|
Prints a string to STDERR
You may optionally format the string with ANSI codes by passing additional parameters using the constants defined in \yii\helpers\Console.
Example:
$this->stderr('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE);
| public int|boolean stderr ( $string ) | ||
| $string | string | The string to print |
| return | int|boolean | Number of bytes printed or false on error |
|---|---|---|
Prints a string to STDOUT
You may optionally format the string with ANSI codes by passing additional parameters using the constants defined in \yii\helpers\Console.
Example:
$this->stdout('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE);
| public int|boolean stdout ( $string ) | ||
| $string | string | The string to print |
| return | int|boolean | Number of bytes printed or false on error |
|---|---|---|