PHP Class N98\Util\OperatingSystem

Afficher le fichier Open project: netz98/n98-magerun Class Usage Examples

Méthodes publiques

Méthode Description
getCwd ( ) : string get current working directory
getHomeDir ( ) : string | false Home directory of the current user
getPhpBinary ( ) : string Retrieve path to php binary
isLinux ( ) : boolean Returns true if operating system is based on GNU linux.
isMacOs ( ) : boolean Returns true if operating system is based on apple MacOS.
isNetware ( ) : boolean Returns true if operating system is based on novell netware.
isProgramInstalled ( string $program ) : boolean
isRoot ( ) : boolean Test for Root UID on a POSIX system if posix_getuid() is available.
isWindows ( ) : boolean Returns true if operating system is based on Microsoft Windows.

Method Details

getCwd() public static méthode

get current working directory
public static getCwd ( ) : string
Résultat string the current working directory on success, or false on failure.

getHomeDir() public static méthode

Home directory of the current user
public static getHomeDir ( ) : string | false
Résultat string | false false in case there is no environment variable related to the home directory

getPhpBinary() public static méthode

Retrieve path to php binary
public static getPhpBinary ( ) : string
Résultat string

isLinux() public static méthode

Returns true if operating system is based on GNU linux.
public static isLinux ( ) : boolean
Résultat boolean

isMacOs() public static méthode

Returns true if operating system is based on apple MacOS.
public static isMacOs ( ) : boolean
Résultat boolean

isNetware() public static méthode

Returns true if operating system is based on novell netware.
public static isNetware ( ) : boolean
Résultat boolean

isProgramInstalled() public static méthode

public static isProgramInstalled ( string $program ) : boolean
$program string
Résultat boolean

isRoot() public static méthode

Returns false negatives if posix_getuid() is not available.
public static isRoot ( ) : boolean
Résultat boolean

isWindows() public static méthode

Returns true if operating system is based on Microsoft Windows.
public static isWindows ( ) : boolean
Résultat boolean