Symfony2 API
Class

Symfony\Component\Console\Helper\FormatterHelper

class FormatterHelper extends Helper

The Formatter class provides helpers to format messages.

Methods

setHelperSet(HelperSet $helperSet = null)

Sets the helper set associated with this helper.

from Helper
HelperSet getHelperSet()

Gets the helper set associated with this helper.

from Helper
string formatSection(string $section, string $message, string $style = 'info')

Formats a message within a section.

string formatBlock(string|array $messages, string $style, Boolean $large = false)

Formats a message as a block of text.

string getName()

Returns the canonical name of this helper.

Details

in Helper at line 28
public setHelperSet(HelperSet $helperSet = null)

Sets the helper set associated with this helper.

Parameters

HelperSet $helperSet A HelperSet instance

in Helper at line 38
public HelperSet getHelperSet()

Gets the helper set associated with this helper.

Return Value

HelperSet A HelperSet instance

at line 32
public string formatSection(string $section, string $message, string $style = 'info')

Formats a message within a section.

Parameters

string $section The section name
string $message The message
string $style The style to apply to the section

Return Value

string The format section

at line 46
public string formatBlock(string|array $messages, string $style, Boolean $large = false)

Formats a message as a block of text.

Parameters

string|array $messages The message to write in the block
string $style The style to apply to the whole block
Boolean $large Whether to return a large block

Return Value

string The formatter message

at line 76
public string getName()

Returns the canonical name of this helper.

Return Value

string The canonical name