Méthode | Description | |
---|---|---|
__construct ( boolean $decorated = false, array $styles = [] ) | Initializes console output formatter. | |
escape ( string $text ) : string | Escapes "<" special char in given text. | |
escapeTrailingBackslash ( string $text ) : string | Escapes trailing "\" in given text. | |
format ( string $message ) : string | Formats a message according to the given styles. | |
getStyle ( string $name ) : Symfony\Component\Console\Formatter\OutputFormatterStyleInterface | Gets style options from style with specified name. | |
getStyleStack ( ) : Symfony\Component\Console\Formatter\OutputFormatterStyleStack | ||
hasStyle ( string $name ) : boolean | Checks if output formatter has style with specified name. | |
isDecorated ( ) : boolean | Gets the decorated flag. | |
setDecorated ( boolean $decorated ) | Sets the decorated flag. | |
setStyle ( string $name, Symfony\Component\Console\Formatter\OutputFormatterStyleInterface $style ) | Sets a new style. |
Méthode | Description | |
---|---|---|
applyCurrentStyle ( string $text ) : string | Applies current style from stack to text, if must be applied. | |
createStyleFromString ( string $string ) : Symfony\Component\Console\Formatter\OutputFormatterStyle | boolean | Tries to create new style instance from string. |
public __construct ( boolean $decorated = false, array $styles = [] ) | ||
$decorated | boolean | Whether this formatter should actually decorate strings |
$styles | array | Array of "name => FormatterStyle" instances |
public static escapeTrailingBackslash ( string $text ) : string | ||
$text | string | Text to escape |
Résultat | string | Escaped text |
public getStyleStack ( ) : Symfony\Component\Console\Formatter\OutputFormatterStyleStack | ||
Résultat | Symfony\Component\Console\Formatter\OutputFormatterStyleStack |
public isDecorated ( ) : boolean | ||
Résultat | boolean | true if the output will decorate messages, false otherwise |
public setDecorated ( boolean $decorated ) | ||
$decorated | boolean | Whether to decorate the messages or not |