Methods |
public
|
__construct(
resource|null $stream = null,
bool $isStdout = true,
bool $isStderr = true,
bool $isTty = true,
?int $width = 80,
?ConsoleFormatterInterface $formatter = null,
)
Parameters
$stream |
Console messages are also written to
$stream if given.
|
|
#
|
public
|
isStdout(): bool
Check if the target writes to STDOUT
Check if the target writes to STDOUT
Implements
|
#
|
public
|
isStderr(): bool
Check if the target writes to STDERR
Check if the target writes to STDERR
Implements
|
#
|
public
|
isTty(): bool
Check if the target writes to a TTY
Check if the target writes to a TTY
Implements
|
#
|
public
|
getEol(): string
Get the target's end-of-line sequence
Get the target's end-of-line sequence
Implements
|
#
|
public
|
close(): void
Close the target and any underlying resources
Close the target and any underlying resources
Implements
|
#
|
public
|
reopen(): void
Close and reopen the underlying PHP stream if possible
Close and reopen the underlying PHP stream if possible
Implements
|
#
|
public
|
getFormatter(): ConsoleFormatterInterface
Get an output formatter for the target
Get an output formatter for the target
Implements
|
#
|
public
|
getWidth(): ?int
Get the width of the target in columns
Get the width of the target in columns
Returns null if output written to the target should not be wrapped.
Output may exceed the width reported by this method, e.g. if a message
contains preformatted text or a long word.
The target may truncate long lines if they cannot be displayed or
recorded.
Implements
|
#
|
public
|
write($level, string $message, array $context = []): void
Write formatted output to the target
Write formatted output to the target
Implements
|
#
|
public
|
getMessages(): array<array{MessageLevel::*, string, 2?: array<string, mixed>}>
Get messages written to the target and flush its message cache
Get messages written to the target and flush its message cache
|
#
|