PHP Класс Resque\Helpers\Util

Автор: Michael Haynes ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
bytes ( integer $bytes, string $force_unit = null, string $format = null, boolean $si = true ) : string Returns human readable sizes. Based on original functions written by Aidan Lister and Quentin Zervaas.
human_time_diff ( integer $from, integer $to = null ) : string Determines the difference between two timestamps.
path ( $array, $path, &$found, $delimiter = '.' ) : boolean Gets a value from an array using a dot separated path.

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

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

Returns human readable sizes. Based on original functions written by Aidan Lister and Quentin Zervaas.
public static bytes ( integer $bytes, string $force_unit = null, string $format = null, boolean $si = true ) : string
$bytes integer size in bytes
$force_unit string a definitive unit
$format string the return string format
$si boolean whether to use SI prefixes or IEC
Результат string

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

The difference is returned in a human readable format such as "1 hour", "5 mins", "2 days".
public static human_time_diff ( integer $from, integer $to = null ) : string
$from integer Unix timestamp from which the difference begins.
$to integer Optional. Unix timestamp to end the time difference. Default becomes time() if not set.
Результат string Human readable time difference.

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

Returns true if found and false if not.
public static path ( $array, $path, &$found, $delimiter = '.' ) : boolean
Результат boolean