PHP Class business\SpecialDay

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

Méthodes publiques

Méthode Description
__construct ( integer $dayOfWeek, callable $openingIntervalsEvaluator ) Creates a new special day.
getClosestOpeningTimeAfter ( Time $time, DateTime $context )
getClosestOpeningTimeBefore ( Time $time, DateTime $context )
getClosingTime ( DateTime $context )
getOpeningTime ( DateTime $context )
isTimeWithinOpeningHours ( Time $time, DateTime $context )
jsonSerialize ( )
serialize ( )
unserialize ( $serialized )

Private Methods

Méthode Description
evaluateOpeningIntervals ( DateTime $context ) Evaluates the opening intervals.
getSerializer ( ) : SuperClosure\Serializer Gets a closure serializer object.

Method Details

__construct() public méthode

Creates a new special day.
public __construct ( integer $dayOfWeek, callable $openingIntervalsEvaluator )
$dayOfWeek integer The day of week
$openingIntervalsEvaluator callable A callable to evaluate opening intervals of the day

getClosestOpeningTimeAfter() public méthode

public getClosestOpeningTimeAfter ( Time $time, DateTime $context )
$time Time
$context DateTime

getClosestOpeningTimeBefore() public méthode

public getClosestOpeningTimeBefore ( Time $time, DateTime $context )
$time Time
$context DateTime

getClosingTime() public méthode

public getClosingTime ( DateTime $context )
$context DateTime

getOpeningTime() public méthode

public getOpeningTime ( DateTime $context )
$context DateTime

isTimeWithinOpeningHours() public méthode

public isTimeWithinOpeningHours ( Time $time, DateTime $context )
$time Time
$context DateTime

jsonSerialize() public méthode

public jsonSerialize ( )

serialize() public méthode

public serialize ( )

unserialize() public méthode

public unserialize ( $serialized )