\app\framework\Component\Console\Output\FormatterOutputFormatter

Summary

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

Properties

$decorated

$decorated : 

Type

$styles

$styles : 

Type

$styleStack

$styleStack : 

Type

Methods

__construct()

__construct(\app\framework\Component\Console\Output\Formatter\bool  $decorated = false, array  $styles = array()) 

Parameters

\app\framework\Component\Console\Output\Formatter\bool $decorated
array $styles

escape()

escape(string  $text) : string

Escapes "<" special char in given text.

Parameters

string $text

Text to escape

Returns

string —

Escaped text

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(\app\framework\Component\Console\Output\Formatter\string  $string) : \app\framework\Component\Console\Output\Formatter\OutputFormatterStyle|false

Tries to create new style instance from string.

Parameters

\app\framework\Component\Console\Output\Formatter\string $string

Returns

\app\framework\Component\Console\Output\Formatter\OutputFormatterStyle|false —

False if string is not format string

applyCurrentStyle()

applyCurrentStyle(\app\framework\Component\Console\Output\Formatter\string  $text) 

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

Parameters

\app\framework\Component\Console\Output\Formatter\string $text