Printer
class Printer (View source)
Utility class that can print to STDOUT or write to a file.
Properties
protected bool | $autoFlush | If true, flush output after every write. | |
protected resource | $out | ||
protected string | $outTarget |
Methods
__construct(mixed $out = null)
Constructor.
flush()
Flush buffer and close output if it's not to a PHP stream
incrementalFlush()
Performs a safe, incremental flush.
write(string $buffer)
No description
bool
getAutoFlush()
Check auto-flush mode.
setAutoFlush(bool $autoFlush)
Set auto-flushing mode.
Details
at line 43
__construct(mixed $out = null)
Constructor.
at line 73
flush()
Flush buffer and close output if it's not to a PHP stream
at line 87
incrementalFlush()
Performs a safe, incremental flush.
Do not confuse this function with the flush() function of this class, since the flush() function may close the file being written to, rendering the current object no longer usable.
at line 99
write(string $buffer)
at line 125
bool
getAutoFlush()
Check auto-flush mode.
at line 138
setAutoFlush(bool $autoFlush)
Set auto-flushing mode.
If set, incremental flushes will be done after each write. This should not be confused with the different effects of this class' flush() method.