PHP Class business\SpecialDay

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

Public Methods

Method 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

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

Method Details

__construct() public method

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 method

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

getClosestOpeningTimeBefore() public method

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

getClosingTime() public method

public getClosingTime ( DateTime $context )
$context DateTime

getOpeningTime() public method

public getOpeningTime ( DateTime $context )
$context DateTime

isTimeWithinOpeningHours() public method

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

jsonSerialize() public method

public jsonSerialize ( )

serialize() public method

public serialize ( )

unserialize() public method

public unserialize ( $serialized )