business\SpecialDay::evaluateOpeningIntervals PHP Method

evaluateOpeningIntervals() private method

Evaluates the opening intervals.
private evaluateOpeningIntervals ( DateTime $context )
$context DateTime
    private function evaluateOpeningIntervals(\DateTime $context)
    {
        $contextHash = $context->format(\DateTime::ISO8601);
        if (!isset($this->openingIntervalsCache[$contextHash])) {
            $intervals = call_user_func($this->openingIntervalsEvaluator, $context);
            if (!is_array($intervals)) {
                throw new \RuntimeException('The special day evaluator must return an array of opening intervals.');
            }
            $this->openingIntervalsCache[$contextHash] = $intervals;
        }
        $this->setOpeningIntervals($this->openingIntervalsCache[$contextHash]);
    }