PHP Класс N98\Util\OperatingSystem

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

getCwd() публичный статический Метод

get current working directory
public static getCwd ( ) : string
Результат string the current working directory on success, or false on failure.

getHomeDir() публичный статический Метод

Home directory of the current user
public static getHomeDir ( ) : string | false
Результат string | false false in case there is no environment variable related to the home directory

getPhpBinary() публичный статический Метод

Retrieve path to php binary
public static getPhpBinary ( ) : string
Результат string

isLinux() публичный статический Метод

Returns true if operating system is based on GNU linux.
public static isLinux ( ) : boolean
Результат boolean

isMacOs() публичный статический Метод

Returns true if operating system is based on apple MacOS.
public static isMacOs ( ) : boolean
Результат boolean

isNetware() публичный статический Метод

Returns true if operating system is based on novell netware.
public static isNetware ( ) : boolean
Результат boolean

isProgramInstalled() публичный статический Метод

public static isProgramInstalled ( string $program ) : boolean
$program string
Результат boolean

isRoot() публичный статический Метод

Returns false negatives if posix_getuid() is not available.
public static isRoot ( ) : boolean
Результат boolean

isWindows() публичный статический Метод

Returns true if operating system is based on Microsoft Windows.
public static isWindows ( ) : boolean
Результат boolean