ConsoleOutputInterface
extends
OutputInterface
in
ConsoleOutputInterface is the interface implemented by ConsoleOutput class.
This adds information about stderr and section output stream.
Tags
Table of Contents
- OUTPUT_NORMAL = 1
- OUTPUT_PLAIN = 4
- OUTPUT_RAW = 2
- VERBOSITY_DEBUG = 256
- VERBOSITY_NORMAL = 32
- VERBOSITY_QUIET = 16
- VERBOSITY_VERBOSE = 64
- VERBOSITY_VERY_VERBOSE = 128
- getErrorOutput() : OutputInterface
- Gets the OutputInterface for errors.
- getFormatter() : OutputFormatterInterface
- Returns current output formatter instance.
- getVerbosity() : int
- Gets the current verbosity of the output.
- isDebug() : bool
- Returns whether verbosity is debug (-vvv).
- isDecorated() : bool
- Gets the decorated flag.
- isQuiet() : bool
- Returns whether verbosity is quiet (-q).
- isVerbose() : bool
- Returns whether verbosity is verbose (-v).
- isVeryVerbose() : bool
- Returns whether verbosity is very verbose (-vv).
- section() : ConsoleSectionOutput
- setDecorated() : mixed
- Sets the decorated flag.
- setErrorOutput() : mixed
- setFormatter() : mixed
- setVerbosity() : mixed
- Sets the verbosity of the output.
- write() : mixed
- Writes a message to the output.
- writeln() : mixed
- Writes a message to the output and adds a newline at the end.
Constants
OUTPUT_NORMAL
public
mixed
OUTPUT_NORMAL
= 1
OUTPUT_PLAIN
public
mixed
OUTPUT_PLAIN
= 4
OUTPUT_RAW
public
mixed
OUTPUT_RAW
= 2
VERBOSITY_DEBUG
public
mixed
VERBOSITY_DEBUG
= 256
VERBOSITY_NORMAL
public
mixed
VERBOSITY_NORMAL
= 32
VERBOSITY_QUIET
public
mixed
VERBOSITY_QUIET
= 16
VERBOSITY_VERBOSE
public
mixed
VERBOSITY_VERBOSE
= 64
VERBOSITY_VERY_VERBOSE
public
mixed
VERBOSITY_VERY_VERBOSE
= 128
Methods
getErrorOutput()
Gets the OutputInterface for errors.
public
getErrorOutput() : OutputInterface
Return values
OutputInterface —getFormatter()
Returns current output formatter instance.
public
getFormatter() : OutputFormatterInterface
Return values
OutputFormatterInterface —getVerbosity()
Gets the current verbosity of the output.
public
getVerbosity() : int
Return values
int —The current level of verbosity (one of the VERBOSITY constants)
isDebug()
Returns whether verbosity is debug (-vvv).
public
isDebug() : bool
Return values
bool —true if verbosity is set to VERBOSITY_DEBUG, false otherwise
isDecorated()
Gets the decorated flag.
public
isDecorated() : bool
Return values
bool —true if the output will decorate messages, false otherwise
isQuiet()
Returns whether verbosity is quiet (-q).
public
isQuiet() : bool
Return values
bool —true if verbosity is set to VERBOSITY_QUIET, false otherwise
isVerbose()
Returns whether verbosity is verbose (-v).
public
isVerbose() : bool
Return values
bool —true if verbosity is set to VERBOSITY_VERBOSE, false otherwise
isVeryVerbose()
Returns whether verbosity is very verbose (-vv).
public
isVeryVerbose() : bool
Return values
bool —true if verbosity is set to VERBOSITY_VERY_VERBOSE, false otherwise
section()
public
section() : ConsoleSectionOutput
Return values
ConsoleSectionOutput —setDecorated()
Sets the decorated flag.
public
setDecorated(bool $decorated) : mixed
Parameters
- $decorated : bool
Return values
mixed —setErrorOutput()
public
setErrorOutput(OutputInterface $error) : mixed
Parameters
- $error : OutputInterface
Return values
mixed —setFormatter()
public
setFormatter(OutputFormatterInterface $formatter) : mixed
Parameters
- $formatter : OutputFormatterInterface
Return values
mixed —setVerbosity()
Sets the verbosity of the output.
public
setVerbosity(int $level) : mixed
Parameters
- $level : int
Return values
mixed —write()
Writes a message to the output.
public
write(string|iteratable<string|int, mixed> $messages[, bool $newline = false ], int $options) : mixed
Parameters
- $messages : string|iteratable<string|int, mixed>
-
The message as an iterable of strings or a single string
- $newline : bool = false
-
Whether to add a newline
- $options : int
-
A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
Return values
mixed —writeln()
Writes a message to the output and adds a newline at the end.
public
writeln(string|iteratable<string|int, mixed> $messages, int $options) : mixed
Parameters
- $messages : string|iteratable<string|int, mixed>
-
The message as an iterable of strings or a single string
- $options : int
-
A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL