Methods |
public
|
removesEscapes(): bool
Check if the formatter removes escapes from strings
Check if the formatter removes escapes from strings
Implemented by
|
#
|
public
|
wrapsAfterFormatting(): bool
Check if the formatter wraps strings after formatting
Check if the formatter wraps strings after formatting
Returns false if strings are wrapped after inline formatting tags are
removed.
Implemented by
|
#
|
public
|
withRemoveEscapes(bool $remove = true): static
Get an instance that removes escapes from strings
Get an instance that removes escapes from strings
Implemented by
|
#
|
public
|
withWrapAfterFormatting(bool $value = true): static
Get an instance that wraps strings after formatting
Get an instance that wraps strings after formatting
Implemented by
|
#
|
public
|
getTagFormat(FormatterInterface::TAG_* $tag): FormatInterface
Get the format applied to a given tag
Get the format applied to a given tag
Implemented by
|
#
|
public
|
getMessageFormat(
ConsoleInterface::LEVEL_* $level,
ConsoleInterface::TYPE_* $type = ConsoleInterface::TYPE_STANDARD,
): MessageFormatInterface
Get the format applied to a given message level and type
Get the format applied to a given message level and type
Implemented by
|
#
|
public
|
getMessagePrefix(
ConsoleInterface::LEVEL_* $level,
ConsoleInterface::TYPE_* $type = ConsoleInterface::TYPE_STANDARD,
): string
Get the prefix applied to a given message level and type
Get the prefix applied to a given message level and type
Implemented by
|
#
|
public
|
format(
string $string,
bool $unwrap = false,
int|array{int, int}|null $wrapTo = null,
bool $unformat = false,
string $break = "\n",
): string
Format and optionally reflow a string with inline formatting tags
Format and optionally reflow a string with inline formatting tags
Parameters
$wrapTo |
int : wrap the string to the
given width
array{int,int} : wrap the string to [ <first_line_width>, <width> ]
null (default): do not wrap the string
|
$unformat |
If true , inline formatting tags are reapplied
after the string is formatted.
|
Implemented by
|
#
|
public
|
formatDiff(string $diff): string
Format a unified diff
|
#
|
public
|
formatMessage(
string $msg1,
?string $msg2 = null,
ConsoleInterface::LEVEL_* $level = ConsoleInterface::LEVEL_INFO,
ConsoleInterface::TYPE_* $type = ConsoleInterface::TYPE_STANDARD,
): string
Format a console message
Format a console message
Inline formatting tags in $msg1 and $msg2 have no special meaning;
call {@see format()} first if necessary.
Implemented by
|
#
|