Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function next()
 {
     if (null === $this->current) {
         $this->current = $this->getFactory()->createSecond($this->begin);
     } else {
         $this->current = $this->current->getNext();
         if (!$this->contains($this->current->getBegin())) {
             $this->current = null;
         }
     }
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function next()
 {
     if (!$this->valid()) {
         $this->current = $this->getFactory()->createWeek($this->getFirstDayOfFirstWeek());
     } else {
         $this->current = $this->current->getNext();
         if ($this->current->getBegin()->format('m') != $this->begin->format('m')) {
             $this->current = null;
         }
     }
 }