class OutputFormatter implements OutputFormatterInterface
Formatter class for console output.
Constants
| FORMAT_PATTERN |
The pattern to phrase the format. |
Methods
| static string |
escape(string $text)
Escapes "<" special char in given text. |
|
|
__construct(Boolean $decorated = null, array $styles = array())
Initializes console output formatter. |
||
|
setDecorated(Boolean $decorated)
Sets the decorated flag. |
||
| Boolean |
isDecorated()
Gets the decorated flag. |
|
|
setStyle(string $name, OutputFormatterStyleInterface $style)
Sets a new style. |
||
| Boolean |
hasStyle(string $name)
Checks if output formatter has style with specified name. |
|
| OutputFormatterStyleInterface |
getStyle(string $name)
Gets style options from style with specified name. |
|
| string |
format(string $message)
Formats a message according to the given styles. |
|
| OutputFormatterStyleStack | getStyleStack() |
Details
at line 39
static public string
escape(string $text)
Escapes "<" special char in given text.
at line 52
public
__construct(Boolean $decorated = null, array $styles = array())
Initializes console output formatter.
at line 75
public
setDecorated(Boolean $decorated)
Sets the decorated flag.
at line 87
public Boolean
isDecorated()
Gets the decorated flag.
at line 100
public
setStyle(string $name, OutputFormatterStyleInterface $style)
Sets a new style.
at line 114
public Boolean
hasStyle(string $name)
Checks if output formatter has style with specified name.
at line 130
public OutputFormatterStyleInterface
getStyle(string $name)
Gets style options from style with specified name.
at line 148
public string
format(string $message)
Formats a message according to the given styles.