Class Symfony\Component\Console\Helper\FormatterHelper

InheritanceSymfony\Component\Console\Helper\FormatterHelper » Symfony\Component\Console\Helper\Helper
ImplementsSymfony\Component\Console\Helper\HelperInterface

The Formatter class provides helpers to format messages.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$helperSet Symfony\Component\Console\Helper\Helper

Method Details

formatBlock() public method

Formats a message as a block of text.

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

The message to write in the block

$style string

The style to apply to the whole block

$large bool

Whether to return a large block

return string

The formatter message

formatSection() public method

Formats a message within a section.

public string formatSection ( $section, $message, $style 'info' )
$section string

The section name

$message string

The message

$style string

The style to apply to the section

return string

The format section

getName() public method

{@inheritdoc}

public void getName ( )
truncate() public method

Truncates a message to the given length.

public string truncate ( $message, $length, $suffix '...' )
$message string
$length int
$suffix string