PHP 클래스 JBZoo\Utils\Sys

파일 보기 프로젝트 열기: jbzoo/utils 1 사용 예제들

공개 메소드들

메소드 설명
IP ( boolean $trustProxy = false ) : string Get remote IP
canCollectCodeCoverage ( ) : boolean Returns true when Xdebug is supported or the runtime used is PHPDBG (PHP >= 7.0).
getBinary ( ) : string Returns the path to the binary of the current runtime.
getDocRoot ( ) : string Return document root
getHome ( ) : string Returns a home directory of current user.
getMemory ( boolean $isPeak = true ) : string Get usage memory
getName ( ) : string
getNameWithVersion ( ) : string
getVendorUrl ( ) : string
getVersion ( ) : string
hasPHPDBGCodeCoverage ( ) : boolean Returns true when the runtime used is PHP with the PHPDBG SAPI and the phpdbg_*_oplog() functions are available (PHP >= 7.0).
hasXdebug ( ) : boolean Returns true when the runtime used is PHP and Xdebug is loaded.
iniGet ( string $varName ) : mixed Alias fo ini_get function
iniSet ( string $varName, string $newValue ) : mixed Alias fo ini_set function
isFunc ( $funcName ) : boolean
isHHVM ( ) : boolean Returns true when the runtime used is HHVM.
isPHP ( string $version, string $current = PHP_VERSION ) : boolean
isPHP53 ( string $current = PHP_VERSION ) : boolean
isPHP7 ( string $current = PHP_VERSION ) : boolean
isPHPDBG ( ) : boolean Returns true when the runtime used is PHP with the PHPDBG SAPI.
isRealPHP ( ) : boolean Returns true when the runtime used is PHP without the PHPDBG SAPI.
isRoot ( ) : boolean Check is current user ROOT
isWin ( ) : boolean Check is current OS Windows
setMemory ( string $newLimit = '256M' ) Set new memory limit
setTime ( integer $newLimit ) Set PHP execution time limit (doesn't work in safe mode)

메소드 상세

IP() 공개 정적인 메소드

Get remote IP
사용 중단: use IP::getRemote()
public static IP ( boolean $trustProxy = false ) : string
$trustProxy boolean
리턴 string

canCollectCodeCoverage() 공개 정적인 메소드

Returns true when Xdebug is supported or the runtime used is PHPDBG (PHP >= 7.0).
public static canCollectCodeCoverage ( ) : boolean
리턴 boolean

getBinary() 공개 정적인 메소드

Appends ' --php' to the path when the runtime is HHVM.
public static getBinary ( ) : string
리턴 string

getDocRoot() 공개 정적인 메소드

Return document root
public static getDocRoot ( ) : string
리턴 string

getHome() 공개 정적인 메소드

Returns a home directory of current user.
public static getHome ( ) : string
리턴 string

getMemory() 공개 정적인 메소드

Get usage memory
public static getMemory ( boolean $isPeak = true ) : string
$isPeak boolean
리턴 string

getName() 공개 정적인 메소드

public static getName ( ) : string
리턴 string

getNameWithVersion() 공개 정적인 메소드

public static getNameWithVersion ( ) : string
리턴 string

getVendorUrl() 공개 정적인 메소드

public static getVendorUrl ( ) : string
리턴 string

getVersion() 공개 정적인 메소드

public static getVersion ( ) : string
리턴 string

hasPHPDBGCodeCoverage() 공개 정적인 메소드

Returns true when the runtime used is PHP with the PHPDBG SAPI and the phpdbg_*_oplog() functions are available (PHP >= 7.0).
public static hasPHPDBGCodeCoverage ( ) : boolean
리턴 boolean

hasXdebug() 공개 정적인 메소드

Returns true when the runtime used is PHP and Xdebug is loaded.
public static hasXdebug ( ) : boolean
리턴 boolean

iniGet() 공개 정적인 메소드

Alias fo ini_get function
public static iniGet ( string $varName ) : mixed
$varName string
리턴 mixed

iniSet() 공개 정적인 메소드

Alias fo ini_set function
public static iniSet ( string $varName, string $newValue ) : mixed
$varName string
$newValue string
리턴 mixed

isFunc() 공개 정적인 메소드

public static isFunc ( $funcName ) : boolean
$funcName
리턴 boolean

isHHVM() 공개 정적인 메소드

Returns true when the runtime used is HHVM.
public static isHHVM ( ) : boolean
리턴 boolean

isPHP() 공개 정적인 메소드

public static isPHP ( string $version, string $current = PHP_VERSION ) : boolean
$version string
$current string
리턴 boolean

isPHP53() 공개 정적인 메소드

public static isPHP53 ( string $current = PHP_VERSION ) : boolean
$current string
리턴 boolean

isPHP7() 공개 정적인 메소드

public static isPHP7 ( string $current = PHP_VERSION ) : boolean
$current string
리턴 boolean

isPHPDBG() 공개 정적인 메소드

Returns true when the runtime used is PHP with the PHPDBG SAPI.
public static isPHPDBG ( ) : boolean
리턴 boolean

isRealPHP() 공개 정적인 메소드

Returns true when the runtime used is PHP without the PHPDBG SAPI.
public static isRealPHP ( ) : boolean
리턴 boolean

isRoot() 공개 정적인 메소드

Check is current user ROOT
public static isRoot ( ) : boolean
리턴 boolean

isWin() 공개 정적인 메소드

Check is current OS Windows
public static isWin ( ) : boolean
리턴 boolean

setMemory() 공개 정적인 메소드

Set new memory limit
public static setMemory ( string $newLimit = '256M' )
$newLimit string

setTime() 공개 정적인 메소드

Set PHP execution time limit (doesn't work in safe mode)
public static setTime ( integer $newLimit )
$newLimit integer