PHP Класс business\SpecialDay

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

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

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

Приватные методы

Метод Описание
evaluateOpeningIntervals ( DateTime $context ) Evaluates the opening intervals.
getSerializer ( ) : SuperClosure\Serializer Gets a closure serializer object.

Описание методов

__construct() публичный Метод

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 getClosestOpeningTimeAfter ( Time $time, DateTime $context )
$time Time
$context DateTime

getClosestOpeningTimeBefore() публичный Метод

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

getClosingTime() публичный Метод

public getClosingTime ( DateTime $context )
$context DateTime

getOpeningTime() публичный Метод

public getOpeningTime ( DateTime $context )
$context DateTime

isTimeWithinOpeningHours() публичный Метод

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

jsonSerialize() публичный Метод

public jsonSerialize ( )

serialize() публичный Метод

public serialize ( )

unserialize() публичный Метод

public unserialize ( $serialized )