Formatter\OutputFormatter (Component\Console)
Symfony\Component\Console\Formatter\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. | |
setStyle(string $name, OutputFormatterStyleInterface $style) Sets a new style. | ||
bool | 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
static public string escape(string $text)
Escapes "<" special char in given text.
public __construct(bool $decorated = false, array $styles = array())
Initializes console output formatter.
public setDecorated(bool $decorated)
Sets the decorated flag.
public bool isDecorated()
Gets the decorated flag.
public setStyle(string $name, OutputFormatterStyleInterface $style)
Sets a new style.
public bool hasStyle(string $name)
Checks if output formatter has style with specified name.
public OutputFormatterStyleInterface getStyle(string $name)
Gets style options from style with specified name.
public string format(string $message)
Formats a message according to the given styles.
public OutputFormatterStyleStack getStyleStack()
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Console/Formatter/OutputFormatter.html