WriterAwareTrait
Trait for shared output functionality.
Tags
Table of Contents
- $outputWriter : WriterInterface
- Writer helper
- setOutputWriter() : void
- Set an object to accept console output messages.
- write() : void
- Write a string to the console output writer (if set).
- writeLine() : void
- Write a string w/newline to the console output writer (if set).
Properties
$outputWriter
Writer helper
protected
WriterInterface
$outputWriter
= null
Methods
setOutputWriter()
Set an object to accept console output messages.
public
setOutputWriter(WriterInterface $writer) : void
Parameters
- $writer : WriterInterface
-
Writer object
Return values
void —write()
Write a string to the console output writer (if set).
protected
write(string $str) : void
Parameters
- $str : string
-
String to write.
Return values
void —writeLine()
Write a string w/newline to the console output writer (if set).
protected
writeLine(string $str) : void
Parameters
- $str : string
-
String to write.