OutputInterface
in
OutputInterface is the interface implemented by all Output classes.
Tags
Table of Contents
Constants
- 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
Methods
- getFormatter() : OutputFormatterInterface
- Returns current output formatter instance.
- getVerbosity() : self::VERBOSITY_*
- 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).
- setDecorated() : void
- Sets the decorated flag.
- setFormatter() : void
- setVerbosity() : void
- Sets the verbosity of the output.
- write() : void
- Writes a message to the output.
- writeln() : void
- 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
getFormatter()
Returns current output formatter instance.
public
getFormatter() : OutputFormatterInterface
Return values
OutputFormatterInterfacegetVerbosity()
Gets the current verbosity of the output.
public
getVerbosity() : self::VERBOSITY_*
Return values
self::VERBOSITY_*isDebug()
Returns whether verbosity is debug (-vvv).
public
isDebug() : bool
Return values
boolisDecorated()
Gets the decorated flag.
public
isDecorated() : bool
Return values
boolisQuiet()
Returns whether verbosity is quiet (-q).
public
isQuiet() : bool
Return values
boolisVerbose()
Returns whether verbosity is verbose (-v).
public
isVerbose() : bool
Return values
boolisVeryVerbose()
Returns whether verbosity is very verbose (-vv).
public
isVeryVerbose() : bool
Return values
boolsetDecorated()
Sets the decorated flag.
public
setDecorated(bool $decorated) : void
Parameters
- $decorated : bool
setFormatter()
public
setFormatter(OutputFormatterInterface $formatter) : void
Parameters
- $formatter : OutputFormatterInterface
setVerbosity()
Sets the verbosity of the output.
public
setVerbosity(self::VERBOSITY_* $level) : void
Parameters
- $level : self::VERBOSITY_*
write()
Writes a message to the output.
public
write(string|iterable<string|int, mixed> $messages[, bool $newline = false ][, int $options = 0 ]) : void
Parameters
- $messages : string|iterable<string|int, mixed>
- $newline : bool = false
-
Whether to add a newline
- $options : int = 0
-
A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
writeln()
Writes a message to the output and adds a newline at the end.
public
writeln(string|iterable<string|int, mixed> $messages[, int $options = 0 ]) : void
Parameters
- $messages : string|iterable<string|int, mixed>
- $options : int = 0
-
A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL