Methods |
public
|
withSpinnerState(array{int<0, max>, float}|null &$state): static
Get an instance with the given spinner state array
Get an instance with the given spinner state array
Implemented by
|
#
|
public
|
withUnescape(bool $value = true): static
Get an instance that unescapes text
Get an instance that unescapes text
Implemented by
|
#
|
public
|
getUnescape(): bool
Check if text is unescaped
Check if text is unescaped
Implemented by
|
#
|
public
|
withWrapAfterApply(bool $value = true): static
Get an instance that wraps text after formatting
Get an instance that wraps text after formatting
Implemented by
|
#
|
public
|
getWrapAfterApply(): bool
Check if text is wrapped after formatting
Check if text is wrapped after formatting
Implemented by
|
#
|
public
|
getTagFormat(ConsoleTag::* $tag): ConsoleFormatInterface
Get the format applied to a tag
Get the format applied to a tag
Implemented by
|
#
|
public
|
getMessageFormat(
MessageLevel::* $level,
ConsoleMessageType::* $type = ConsoleMessageType::STANDARD,
): ConsoleMessageFormatInterface
Get the format applied to a message level and type
Get the format applied to a message level and type
Implemented by
|
#
|
public
|
getMessagePrefix(MessageLevel::* $level, ConsoleMessageType::* $type = ConsoleMessageType::STANDARD): string
Get the prefix applied to a message level and type
Get the prefix applied to a message level and type
Implemented by
|
#
|
public
|
format(
string $string,
bool $unwrap = false,
array{int, int}|int|null $wrapToWidth = null,
bool $unformat = false,
string $break = "\n",
): string
Format a string that may contain inline formatting tags
Format a string that may contain inline formatting tags
Paragraphs outside preformatted blocks are optionally wrapped to a given
width, and backslash-escaped punctuation characters and line breaks are
preserved.
Escaped line breaks may have a leading space, so the following are
equivalent:
Text with a \
hard line break.
Text with a\
hard line break.
Parameters
$wrapToWidth |
If null (the default), text
is not wrapped.
|
$unformat |
If true , formatting tags are reapplied after text
is unwrapped and/or wrapped.
|
Implemented by
|
#
|
public
|
formatMessage(
string $msg1,
?string $msg2 = null,
MessageLevel::* $level = MessageLevel::INFO,
ConsoleMessageType::* $type = ConsoleMessageType::STANDARD,
): string
Format a console message
|
#
|
public
|
formatDiff(string $diff): string
Format a unified diff
|
#
|