Lines Matching refs:this

94         if (is_null($this->timeZone)) {
97 $this->timeZone = $timeZone;
121 $this->masterEvent = $vevent;
125 $this->exceptions[
126 $vevent->{'RECURRENCE-ID'}->getDateTime($this->timeZone)->getTimeStamp()
128 $this->overriddenEvents[] = $vevent;
134 if (!$this->masterEvent) {
141 if (!count($this->overriddenEvents)) {
144 $this->masterEvent = array_shift($this->overriddenEvents);
147 $this->startDate = $this->masterEvent->DTSTART->getDateTime($this->timeZone);
148 $this->allDay = !$this->masterEvent->DTSTART->hasTime();
150 if (isset($this->masterEvent->EXDATE)) {
152 foreach($this->masterEvent->EXDATE as $exDate) {
154 foreach($exDate->getDateTimes($this->timeZone) as $dt) {
155 $this->exceptions[$dt->getTimeStamp()] = true;
162 if (isset($this->masterEvent->DTEND)) {
163 $this->eventDuration =
164 $this->masterEvent->DTEND->getDateTime($this->timeZone)->getTimeStamp() -
165 $this->startDate->getTimeStamp();
166 } elseif (isset($this->masterEvent->DURATION)) {
167 $duration = $this->masterEvent->DURATION->getDateInterval();
168 $end = clone $this->startDate;
170 $this->eventDuration = $end->getTimeStamp() - $this->startDate->getTimeStamp();
171 } elseif ($this->allDay) {
172 $this->eventDuration = 3600 * 24;
174 $this->eventDuration = 0;
177 if (isset($this->masterEvent->RDATE)) {
178 $this->recurIterator = new RDateIterator(
179 $this->masterEvent->RDATE->getParts(),
180 $this->startDate
182 } elseif (isset($this->masterEvent->RRULE)) {
183 $this->recurIterator = new RRuleIterator(
184 $this->masterEvent->RRULE->getParts(),
185 $this->startDate
188 $this->recurIterator = new RRuleIterator(
193 $this->startDate
197 $this->rewind();
198 if (!$this->valid()) {
211 if ($this->currentDate) {
212 return clone $this->currentDate;
225 if ($this->currentDate) {
226 return clone $this->currentDate;
239 if (!$this->valid()) {
242 $end = clone $this->currentDate;
243 $end->modify('+' . $this->eventDuration . ' seconds');
258 if ($this->currentOverriddenEvent) {
259 return $this->currentOverriddenEvent;
262 $event = clone $this->masterEvent;
277 $event->DTSTART->setDateTime($this->getDtStart(), $event->DTSTART->isFloating());
279 $event->DTEND->setDateTime($this->getDtEnd(), $event->DTEND->isFloating());
286 if ($this->recurIterator->key() > 1) {
305 return $this->counter - 1;
317 return !!$this->currentDate;
326 $this->recurIterator->rewind();
329 foreach($this->overriddenEvents as $key=>$event) {
330 $stamp = $event->DTSTART->getDateTime($this->timeZone)->getTimeStamp();
334 $this->counter = 0;
335 $this->overriddenEventsIndex = $index;
336 $this->currentOverriddenEvent = null;
338 $this->nextDate = null;
339 $this->currentDate = clone $this->startDate;
341 $this->next();
352 $this->currentOverriddenEvent = null;
353 $this->counter++;
354 if ($this->nextDate) {
356 $nextDate = $this->nextDate;
357 $this->nextDate = null;
363 if (!$this->recurIterator->valid()) {
367 $nextDate = $this->recurIterator->current();
368 $this->recurIterator->next();
369 } while(isset($this->exceptions[$nextDate->getTimeStamp()]));
376 if ($this->overriddenEventsIndex) {
378 $offset = end($this->overriddenEventsIndex);
379 $timestamp = key($this->overriddenEventsIndex);
382 $this->currentOverriddenEvent = $this->overriddenEvents[$offset];
385 $this->nextDate = $nextDate;
386 … $this->currentDate = $this->currentOverriddenEvent->DTSTART->getDateTime($this->timeZone);
389 array_pop($this->overriddenEventsIndex);
398 $this->currentDate = $nextDate;
409 while($this->valid() && $this->getDtEnd() < $dateTime ) {
410 $this->next();
422 return $this->recurIterator->isInfinite();