PHP Класс business\Time

Автор: Florian Voutzinos ([email protected])
Наследование: implements JsonSerializable
Показать файл Открыть проект Примеры использования класса

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

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