OutputFormatter
class OutputFormatter implements WrappableOutputFormatterInterface
Formatter class for console output.
Methods
static string
escape(string $text)
Escapes "<" special char in given text.
static string
escapeTrailingBackslash(string $text)
Escapes trailing "\" in given text.
__construct(bool $decorated = false, array $styles = array())
Initializes console output formatter.
setDecorated(bool $decorated)
Sets the decorated flag.
bool
isDecorated()
Gets the decorated flag.
bool
hasStyle(string $name)
Checks if output formatter has style with specified name.
getStyle(string $name)
Gets style options from style with specified name.
string
format(string $message)
Formats a message according to the given styles.
formatAndWrap(string $message, int $width)
Formats a message according to the given styles, wrapping at $width
(0 means no wrapping).
getStyleStack()
No description
Details
OutputFormatterStyleInterface
getStyle(string $name)
Gets style options from style with specified name.