OutputFormatter
class OutputFormatter implements OutputFormatterInterface
Formatter class for console output.
Methods
static string
escape(string $text)
Escapes "<" special char 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.
getStyleStack()
No description
Details
at line line 34
static string
escape(string $text)
Escapes "<" special char in given text.
at line line 45
__construct(bool $decorated = false, array $styles = array())
Initializes console output formatter.
at line line 66
setDecorated(bool $decorated)
Sets the decorated flag.
at line line 76
bool
isDecorated()
Gets the decorated flag.
at line line 87
setStyle(string $name, OutputFormatterStyleInterface $style)
Sets a new style.
at line line 99
bool
hasStyle(string $name)
Checks if output formatter has style with specified name.
at line line 113
OutputFormatterStyleInterface
getStyle(string $name)
Gets style options from style with specified name.
at line line 129
string
format(string $message)
Formats a message according to the given styles.