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 |
| static int | strlen(string $string) Returns the length of a string, using mb_strwidth if it is available. | from Helper |
| static | formatTime($secs) | from Helper |
| static | formatMemory($memory) | from Helper |
| static | strlenWithoutDecoration(OutputFormatterInterface $formatter, $string) | from Helper |
| string | formatSection(string $section, string $message, string $style = 'info') Formats a message within a section. | |
| string | formatBlock(string|array $messages, string $style, bool $large = false) Formats a message as a block of text. | |
| string | truncate(string $message, int $length, string $suffix = '...') Truncates a message to the given length. | |
| string | getName() Returns the canonical name of this helper. |
Details
setHelperSet(HelperSet $helperSet = null)
Sets the helper set associated with this helper.
HelperSet getHelperSet()
Gets the helper set associated with this helper.
static int strlen(string $string)
Returns the length of a string, using mb_strwidth if it is available.
static formatTime($secs)
static formatMemory($memory)
static strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)
string formatSection(string $section, string $message, string $style = 'info')
Formats a message within a section.
string formatBlock(string|array $messages, string $style, bool $large = false)
Formats a message as a block of text.
string truncate(string $message, int $length, string $suffix = '...')
Truncates a message to the given length.
string getName()
Returns the canonical name of this helper.
Please login to continue.