class SysEnv

Class EnvHelper

Methods

static bool
isUnix()

No description

static bool
isLinux()

No description

static bool
isWin()

No description

static bool
isWindows()

No description

static bool
isMac()

No description

static bool
isRoot()

No description

static string
getHostname()

No description

static string
getNullDevice()

No description

static boolean
isSupportColor()

Returns true if STDOUT supports colorization.

static boolean
isInteractive(int|resource $fileDescriptor)

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

Details

at line 24
static bool isUnix()

Return Value

bool

at line 34
static bool isLinux()

Return Value

bool

at line 42
static bool isWin()

Return Value

bool

at line 50
static bool isWindows()

Return Value

bool

at line 58
static bool isMac()

Return Value

bool

at line 66
static bool isRoot()

Return Value

bool

at line 78
static string getHostname()

Return Value

string

at line 86
static string getNullDevice()

Return Value

string

at line 101
static boolean isSupportColor()

Returns true if STDOUT supports colorization.

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

Return Value

boolean

at line 124
static boolean isInteractive(int|resource $fileDescriptor)

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

Parameters

int|resource $fileDescriptor

Return Value

boolean