PHP 클래스 N98\Util\OperatingSystem

파일 보기 프로젝트 열기: netz98/n98-magerun 1 사용 예제들

공개 메소드들

메소드 설명
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