◆ getNumberOfColumns()
SebastianBergmann\Environment\Console::getNumberOfColumns |
( |
| ) |
|
Returns the number of columns of the terminal.
@codeCoverageIgnore
◆ hasColorSupport()
SebastianBergmann\Environment\Console::hasColorSupport |
( |
| ) |
|
Returns true if STDOUT supports colorization.
This code has been copied and adapted from Symfony\Component\Console\Output\StreamOutput.
◆ isInteractive()
SebastianBergmann\Environment\Console::isInteractive |
( |
|
$fileDescriptor = self::STDOUT | ) |
|
Returns if the file descriptor is an interactive terminal or not.
Normally, we want to use a resource as a parameter, yet sadly it's not always awailable, eg when running code in interactive console (php -a
), STDIN/STDOUT/STDERR constants are not defined.
- Parameters
-
int | resource | $fileDescriptor | |
◆ STDERR
const SebastianBergmann\Environment\Console::STDERR = 2 |
◆ STDIN
const SebastianBergmann\Environment\Console::STDIN = 0 |
◆ STDOUT
const SebastianBergmann\Environment\Console::STDOUT = 1 |
The documentation for this class was generated from the following file: