\Composer\ConsoleHtmlOutputFormatter

Formatter class for console output.

Summary

Methods
Properties
Constants
escape()
__construct()
setDecorated()
isDecorated()
setStyle()
hasStyle()
getStyle()
format()
getStyleStack()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
createStyleFromString()
applyCurrentStyle()
formatHtml()
$decorated
$styles
$styleStack
$availableForegroundColors
$availableBackgroundColors
$availableOptions
N/A

Properties

$decorated

$decorated : 

Type

$styles

$styles : 

Type

$styleStack

$styleStack : 

Type

$availableForegroundColors

$availableForegroundColors : 

Type

$availableBackgroundColors

$availableBackgroundColors : 

Type

$availableOptions

$availableOptions : 

Type

Methods

escape()

escape(string  $text) : string

Escapes "<" special char in given text.

Parameters

string $text

Text to escape

Returns

string —

Escaped text

__construct()

__construct(array  $styles = array()) 

Initializes console output formatter.

Parameters

array $styles

Array of "name => FormatterStyle" instances

setDecorated()

setDecorated(boolean  $decorated) 

Sets the decorated flag.

Parameters

boolean $decorated

Whether to decorate the messages or not

isDecorated()

isDecorated() : boolean

Gets the decorated flag.

Returns

boolean —

true if the output will decorate messages, false otherwise

hasStyle()

hasStyle(string  $name) : boolean

Checks if output formatter has style with specified name.

Parameters

string $name

Returns

boolean

format()

format(string  $message) : string

Formats a message according to the given styles.

Parameters

string $message

The message to style

Returns

string —

The styled message

createStyleFromString()

createStyleFromString(\Symfony\Component\Console\Formatter\string  $string) : \Symfony\Component\Console\Formatter\OutputFormatterStyle|false

Tries to create new style instance from string.

Parameters

\Symfony\Component\Console\Formatter\string $string

Returns

\Symfony\Component\Console\Formatter\OutputFormatterStyle|false —

False if string is not format string

applyCurrentStyle()

applyCurrentStyle(\Symfony\Component\Console\Formatter\string  $text) 

Applies current style from stack to text, if must be applied.

Parameters

\Symfony\Component\Console\Formatter\string $text

formatHtml()

formatHtml(  $matches) 

Parameters

$matches