SymfonyOutputWriter
API reference › Scaffold › Console › SymfonyOutputWriter
Writes service messages to a Symfony Console output in raw mode, so stub content such as <?php ?> is never parsed
as style tags.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates a writer for a Symfony Console output. | SymfonyOutputWriter |
isDecorated() | Returns whether the console output supports ANSI decoration. | SymfonyOutputWriter |
writeStderr() | Writes $message and a newline to the error output, or to the main output when no error output is available. | SymfonyOutputWriter |
writeStdout() | Writes $message and a newline to the main output. | SymfonyOutputWriter |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(Symfony\Component\Console\Output\OutputInterface $output)Creates a writer for a Symfony Console output.
Parameters
| Parameter | Type | Description |
|---|---|---|
$output | Symfony\ | Console output that receives the messages and, through its error output when it is a ConsoleOutputInterface, the standard error messages. |
isDecorated()
Section titled “isDecorated() ”public function isDecorated(): boolReturns whether the console output supports ANSI decoration.
Returns
bool: true when the main output is decorated, false otherwise.
writeStderr()
Section titled “writeStderr() ”public function writeStderr(string $message): voidWrites $message and a newline to the error output, or to the main output when no error output is available.
Parameters
| Parameter | Type | Description |
|---|---|---|
$message | string | Message without a trailing newline; the writer appends one. |
writeStdout()
Section titled “writeStdout() ”public function writeStdout(string $message): voidWrites $message and a newline to the main output.
Parameters
| Parameter | Type | Description |
|---|---|---|
$message | string | Message without a trailing newline; the writer appends one. |