Console
in package
Table of Contents
- STDERR = 2
- STDIN = 0
- STDOUT = 1
- getNumberOfColumns() : int
- Returns the number of columns of the terminal.
- hasColorSupport() : bool
- Returns true if STDOUT supports colorization.
- isInteractive() : bool
- Returns if the file descriptor is an interactive terminal or not.
Constants
STDERR
public
mixed
STDERR
= 2
STDIN
public
mixed
STDIN
= ""
STDOUT
public
mixed
STDOUT
= 1
Methods
getNumberOfColumns()
Returns the number of columns of the terminal.
public
getNumberOfColumns() : int
Return values
int —hasColorSupport()
Returns true if STDOUT supports colorization.
public
hasColorSupport() : bool
This code has been copied and adapted from Symfony\Component\Console\Output\OutputStream.
Return values
bool —isInteractive()
Returns if the file descriptor is an interactive terminal or not.
public
isInteractive([int|resource $fileDescriptor = self::STDOUT ]) : bool
Parameters
- $fileDescriptor : int|resource = self::STDOUT