Menu

## Console
in package

Console.php : 32

### 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.
getNumberOfColumnsInteractive() : int
getNumberOfColumnsWindows() : int
isWindows() : bool

### Constants

#### STDERR

Console.php : 47
`public int STDERR = 2`

#### STDIN

Console.php : 37
`public int STDIN = 0`

#### STDOUT

Console.php : 42
`public int STDOUT = 1`

### Methods

#### getNumberOfColumns()

Console.php : 84

Returns the number of columns of the terminal.

`public getNumberOfColumns() : int`

##### Tags

codeCoverageIgnore

##### Return values

int —

#### hasColorSupport()

Console.php : 55

Returns true if STDOUT supports colorization.

`public hasColorSupport() : bool`

This code has been copied and adapted from Symfony\Component\Console\Output\StreamOutput.

##### Return values

bool —

#### isInteractive()

Console.php : 105

Returns if the file descriptor is an interactive terminal or not.

`public isInteractive([int|resource $fileDescriptor = self::STDOUT ]) : bool`

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

$fileDescriptor : int|resource = self::STDOUT

##### Return values

bool —

#### getNumberOfColumnsInteractive()

Console.php : 134
`private getNumberOfColumnsInteractive() : int`

##### Tags

codeCoverageIgnore

##### Return values

int —

#### getNumberOfColumnsWindows()

Console.php : 154
`private getNumberOfColumnsWindows() : int`

##### Tags

codeCoverageIgnore

##### Return values

int —

#### isWindows()

Console.php : 126
`private isWindows() : bool`

##### Return values

bool —

## Search results