Sabre\VObject\Recur\EventIterator::rewind PHP Method

rewind() public method

Sets the iterator back to the starting point.
public rewind ( )
    public function rewind()
    {
        $this->recurIterator->rewind();
        // re-creating overridden event index.
        $index = array();
        foreach ($this->overriddenEvents as $key => $event) {
            $stamp = $event->DTSTART->getDateTime($this->timeZone)->getTimeStamp();
            $index[$stamp] = $key;
        }
        krsort($index);
        $this->counter = 0;
        $this->overriddenEventsIndex = $index;
        $this->currentOverriddenEvent = null;
        $this->nextDate = null;
        $this->currentDate = clone $this->startDate;
        $this->next();
    }