PHP 클래스 business\Time

저자: Florian Voutzinos ([email protected])
상속: implements JsonSerializable
파일 보기 프로젝트 열기: florianv/business 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string | integer $hours, string | integer $minutes, string | integer $seconds ) Creates a new time.
fromDate ( DateTime $date ) : Time Creates a new time from a date.
fromString ( string $time ) : Time Creates a new time from a string.
getHours ( ) : integer Gets the hours.
getMinutes ( ) : integer Gets the minutes.
getSeconds ( ) : integer Gets the seconds.
isAfterOrEqual ( Time $other ) : boolean Checks if this time is after or equal to an other time.
isBeforeOrEqual ( Time $other ) : boolean Checks if this time is before or equal to an other time.
jsonSerialize ( )
toInteger ( ) : integer Returns an integer representation of the time.
toString ( ) : integer Returns an integer representation of the time.

메소드 상세

__construct() 공개 메소드

Creates a new time.
public __construct ( string | integer $hours, string | integer $minutes, string | integer $seconds )
$hours string | integer
$minutes string | integer
$seconds string | integer Optional seconds

fromDate() 공개 정적인 메소드

Creates a new time from a date.
public static fromDate ( DateTime $date ) : Time
$date DateTime
리턴 Time

fromString() 공개 정적인 메소드

Creates a new time from a string.
public static fromString ( string $time ) : Time
$time string
리턴 Time

getHours() 공개 메소드

Gets the hours.
public getHours ( ) : integer
리턴 integer

getMinutes() 공개 메소드

Gets the minutes.
public getMinutes ( ) : integer
리턴 integer

getSeconds() 공개 메소드

Gets the seconds.
public getSeconds ( ) : integer
리턴 integer

isAfterOrEqual() 공개 메소드

Checks if this time is after or equal to an other time.
public isAfterOrEqual ( Time $other ) : boolean
$other Time
리턴 boolean

isBeforeOrEqual() 공개 메소드

Checks if this time is before or equal to an other time.
public isBeforeOrEqual ( Time $other ) : boolean
$other Time
리턴 boolean

jsonSerialize() 공개 메소드

public jsonSerialize ( )

toInteger() 공개 메소드

Returns an integer representation of the time.
public toInteger ( ) : integer
리턴 integer

toString() 공개 메소드

Returns an integer representation of the time.
public toString ( ) : integer
리턴 integer