Symfony\Component\Console\Output\StreamOutput
StreamOutput writes the output to a given stream.
Usage:
$output = new StreamOutput(fopen('php://stdout', 'w'));
As `StreamOutput` can use any stream, you can also use a file:
$output = new StreamOutput(fopen('/path/to/output.log', 'a', false));
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class StreamOutput
extends Output
{
- // members
- private $stream;
- // methods
- public void __construct()
- public resource getStream()
- protected void doWrite()
- protected Boolean hasColorSupport()
- // Inherited methods from Output
- public void __construct()
- public void setFormatter()
- public void getFormatter()
- public void setDecorated()
- public void isDecorated()
- public void setVerbosity()
- public void getVerbosity()
- public void writeln()
- public void write()
- protected abstract void doWrite()
Hierarchy
Extends
Extended by
Constants
Name | Value |
---|---|
VERBOSITY_QUIET | 0 |
VERBOSITY_NORMAL | 1 |
VERBOSITY_VERBOSE | 2 |
VERBOSITY_VERY_VERBOSE | 3 |
VERBOSITY_DEBUG | 4 |
OUTPUT_NORMAL | 0 |
OUTPUT_RAW | 1 |
OUTPUT_PLAIN | 2 |
Members
private
- $stream
Methods
protected
- doWrite() — {@inheritdoc}
- hasColorSupport() — Returns true if the stream supports colorization.
public
- __construct() — Constructor.
- getStream() — Gets the stream attached to this StreamOutput instance.
Inherited from Symfony\Component\Console\Output\Output
protected
- doWrite() — Writes a message to the output.
public
- getFormatter() — {@inheritdoc}
- getVerbosity() — {@inheritdoc}
- isDecorated() — {@inheritdoc}
- setDecorated() — {@inheritdoc}
- setFormatter() — {@inheritdoc}
- setVerbosity() — {@inheritdoc}
- write() — {@inheritdoc}
- writeln() — {@inheritdoc}