Exemple #1
0
 function addSlot(Slot $slot)
 {
     if ($this->isSlotsAvailable()) {
         $this->total += $slot->getPeriod()->i;
         $slot->setTime(new \DateTime($this->timeIndex->format('H:i')));
         $this->slots[] = $slot;
         $this->timeIndex = $this->timeIndex->add($slot->getPeriod());
     }
     return $this;
 }