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]);
    }
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]);
    }
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 ] ) ; }
Evaluates the opening intervals.

@param \DateTime $context

@throws \RuntimeException If the evaluated interval is invalid
Evaluates the opening intervals .