PHP Класс JBZoo\Utils\Sys

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

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

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