Symfony2 API
Interface

Symfony\Component\Console\Formatter\OutputFormatterInterface

interface OutputFormatterInterface

Formatter interface for console output.

Methods

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.

Details

at line 30
public setDecorated(bool $decorated)

Sets the decorated flag.

Parameters

bool $decorated Whether to decorate the messages or not

at line 39
public bool isDecorated()

Gets the decorated flag.

Return Value

bool true if the output will decorate messages, false otherwise

at line 49
public setStyle(string $name, OutputFormatterStyleInterface $style)

Sets a new style.

Parameters

string $name The style name
OutputFormatterStyleInterface $style The style instance

at line 60
public bool hasStyle(string $name)

Checks if output formatter has style with specified name.

Parameters

string $name

Return Value

bool

at line 71
public OutputFormatterStyleInterface getStyle(string $name)

Gets style options from style with specified name.

Parameters

string $name

Return Value

OutputFormatterStyleInterface

at line 82
public string format(string $message)

Formats a message according to the given styles.

Parameters

string $message The message to style

Return Value

string The styled message