PHP Class business\TimeInterval

Author: Florian Voutzinos ([email protected])
Inheritance: implements JsonSerializable
Afficher le fichier Open project: florianv/business Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Time $start, Time $end ) Creates a time interval.
contains ( Time $time ) : boolean Checks if the interval contains the given time.
fromString ( string $startTime, string $endTime ) : TimeInterval Creates a new interval from time strings.
getEnd ( ) : Time Gets the end time.
getStart ( ) : Time Gets the start time.
jsonSerialize ( )

Method Details

__construct() public méthode

Creates a time interval.
public __construct ( Time $start, Time $end )
$start Time
$end Time

contains() public méthode

Checks if the interval contains the given time.
public contains ( Time $time ) : boolean
$time Time
Résultat boolean

fromString() public static méthode

Creates a new interval from time strings.
public static fromString ( string $startTime, string $endTime ) : TimeInterval
$startTime string The start time
$endTime string The end time
Résultat TimeInterval

getEnd() public méthode

Gets the end time.
public getEnd ( ) : Time
Résultat Time

getStart() public méthode

Gets the start time.
public getStart ( ) : Time
Résultat Time

jsonSerialize() public méthode

public jsonSerialize ( )