TYPO3
7.6
|
Public Member Functions | |
__construct ($stream, $verbosity=self::VERBOSITY_NORMAL, $decorated=null, OutputFormatterInterface $formatter=null) | |
getStream () | |
Public Member Functions inherited from Output | |
__construct ($verbosity=self::VERBOSITY_NORMAL, $decorated=false, OutputFormatterInterface $formatter=null) | |
setFormatter (OutputFormatterInterface $formatter) | |
getFormatter () | |
setDecorated ($decorated) | |
isDecorated () | |
setVerbosity ($level) | |
getVerbosity () | |
isQuiet () | |
isVerbose () | |
isVeryVerbose () | |
isDebug () | |
writeln ($messages, $type=self::OUTPUT_NORMAL) | |
write ($messages, $newline=false, $type=self::OUTPUT_NORMAL) | |
Protected Member Functions | |
doWrite ($message, $newline) | |
hasColorSupport () | |
Protected Member Functions inherited from Output | |
doWrite ($message, $newline) | |
Private Attributes | |
$stream | |
Additional Inherited Members | |
Public Attributes inherited from OutputInterface | |
const | VERBOSITY_QUIET = 0 |
const | VERBOSITY_NORMAL = 1 |
const | VERBOSITY_VERBOSE = 2 |
const | VERBOSITY_VERY_VERBOSE = 3 |
const | VERBOSITY_DEBUG = 4 |
const | OUTPUT_NORMAL = 0 |
const | OUTPUT_RAW = 1 |
const | OUTPUT_PLAIN = 2 |
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));
Definition at line 31 of file StreamOutput.php.
__construct | ( | $stream, | |
$verbosity = self::VERBOSITY_NORMAL , |
|||
$decorated = null , |
|||
OutputFormatterInterface | $formatter = null |
||
) |
Constructor.
mixed | $stream | A stream resource |
int | $verbosity | The verbosity level (one of the VERBOSITY constants in OutputInterface) |
bool | null | $decorated | Whether to decorate messages (null for auto-guessing) |
OutputFormatterInterface | null | $formatter | Output formatter instance (null to use default OutputFormatter) |
\InvalidArgumentException | When first argument is not a real stream |
Definition at line 47 of file StreamOutput.php.
References Output\$formatter, StreamOutput\$stream, Output\$verbosity, and StreamOutput\hasColorSupport().
|
protected |
{}
Definition at line 75 of file StreamOutput.php.
getStream | ( | ) |
Gets the stream attached to this StreamOutput instance.
Definition at line 67 of file StreamOutput.php.
References StreamOutput\$stream.
Referenced by ProcessHelperTest\getOutput(), LegacyTableHelperTest\getOutputContent(), and TableTest\getOutputContent().
|
protected |
Returns true if the stream supports colorization.
Colorization is disabled if not supported by the stream:
Definition at line 95 of file StreamOutput.php.
Referenced by StreamOutput\__construct().
|
private |
Definition at line 33 of file StreamOutput.php.
Referenced by StreamOutput\__construct(), and StreamOutput\getStream().