PHP Class Phalcon\Cli\Environment\Environment

Inheritance: implements Phalcon\Cli\Environment\EnvironmentInterface
Datei anzeigen Open project: phalcon/incubator

Protected Properties

Property Type Description
$dimensions array Terminal dimensions

Public Methods

Method Description
getDimensions ( ) : array Gets the terminal dimensions based on the current environment.
getModeCon ( ) : null | string Runs and parses Microsoft DOS MODE CON command if it's available.
getNumberOfColumns ( ) : integer
getNumberOfRows ( ) : integer
getSttySize ( ) : null | string Runs and parses stty size command if it's available.
hasColorSupport ( ) : boolean
isAnsicon ( ) : boolean When currently running under MS Windows checks if ANSI x3.64 is supported and enabled.
isConsole ( ) : boolean
isInteractive ( integer | resource $fd = EnvironmentInterface::STDOUT ) : boolean
isWindows ( ) : boolean
setDimensions ( integer $width, integer $height ) Sets terminal dimensions.

Method Details

getDimensions() public method

Gets the terminal dimensions based on the current environment.
public getDimensions ( ) : array
return array

getModeCon() public method

Runs and parses Microsoft DOS MODE CON command if it's available.
public getModeCon ( ) : null | string
return null | string

getNumberOfColumns() public method

public getNumberOfColumns ( ) : integer
return integer

getNumberOfRows() public method

public getNumberOfRows ( ) : integer
return integer

getSttySize() public method

Runs and parses stty size command if it's available.
public getSttySize ( ) : null | string
return null | string

hasColorSupport() public method

public hasColorSupport ( ) : boolean
return boolean

isAnsicon() public method

When currently running under MS Windows checks if ANSI x3.64 is supported and enabled.
public isAnsicon ( ) : boolean
return boolean

isConsole() public method

public isConsole ( ) : boolean
return boolean

isInteractive() public method

public isInteractive ( integer | resource $fd = EnvironmentInterface::STDOUT ) : boolean
$fd integer | resource File descriptor, must be either a file resource or an integer [Optional]
return boolean

isWindows() public method

public isWindows ( ) : boolean
return boolean

setDimensions() public method

Sets terminal dimensions.
public setDimensions ( integer $width, integer $height )
$width integer The width
$height integer The height

Property Details

$dimensions protected_oe property

Terminal dimensions
protected array $dimensions
return array