PHP 클래스 Resque\Helpers\Util

저자: Michael Haynes ([email protected])
파일 보기 프로젝트 열기: mjphaynes/php-resque 1 사용 예제들

공개 메소드들

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