Methods |
public
|
__construct(string $before = '', string $after = '', array<string, string> $replace = [])
|
#
|
public
|
apply(?string $text, $attributes = null): string
Format text before it is written to the target
Format text before it is written to the target
Implements
|
#
|
public
static
|
getDefaultFormat(): self
Get an instance that doesn't apply any formatting to console output
Get an instance that doesn't apply any formatting to console output
|
#
|
public
static
|
ttyColour(EscapeSequence::* $colour): self
Get an instance that uses terminal control sequences to apply a colour to
TTY output
Get an instance that uses terminal control sequences to apply a colour to
TTY output
Parameters
$colour |
The terminal control sequence of the desired
colour.
|
|
#
|
public
static
|
ttyBold(EscapeSequence::*|null $colour = null): self
Get an instance that uses terminal control sequences to increase the
intensity of TTY output and optionally apply a…
Get an instance that uses terminal control sequences to increase the
intensity of TTY output and optionally apply a colour
Parameters
$colour |
The terminal control sequence of the
desired colour. If null , no colour changes are applied.
|
|
#
|
public
static
|
ttyDim(EscapeSequence::*|null $colour = null): self
Get an instance that uses terminal control sequences to decrease the
intensity of TTY output and optionally apply a…
Get an instance that uses terminal control sequences to decrease the
intensity of TTY output and optionally apply a colour
Parameters
$colour |
The terminal control sequence of the
desired colour. If null , no colour changes are applied.
|
|
#
|
public
static
|
ttyBoldDim(EscapeSequence::*|null $colour = null): self
Get an instance that uses terminal control sequences to apply bold and
dim attributes to TTY output and optionally…
Get an instance that uses terminal control sequences to apply bold and
dim attributes to TTY output and optionally apply a colour
If bold (increased intensity) and dim (decreased intensity) attributes
cannot be set simultaneously, output will be dim, not bold.
Parameters
$colour |
The terminal control sequence of the
desired colour. If null , no colour changes are applied.
|
|
#
|
public
static
|
ttyUnderline(EscapeSequence::*|null $colour = null): self
Get an instance that uses terminal control sequences to underline and
optionally apply a colour to TTY output
Get an instance that uses terminal control sequences to underline and
optionally apply a colour to TTY output
Parameters
$colour |
The terminal control sequence of the
desired colour. If null , no colour changes are applied.
|
|
#
|