Example #1
0
 /**
  * Commit current changes
  */
 public function commit()
 {
     if ($this->_currentSegment !== null) {
         $newSegment = $this->_currentSegment->close();
         if ($newSegment !== null) {
             $this->_newSegments[$newSegment->getName()] = $newSegment;
         }
         $this->_currentSegment = null;
     }
     $this->_updateSegments();
 }
Example #2
0
 /**
  * Commit current changes
  */
 public function commit()
 {
     if ($this->_currentSegment !== null) {
         $newSegment = $this->_currentSegment->close();
         if ($newSegment !== null) {
             $this->_newSegments[$newSegment->getName()] = $newSegment;
         }
         $this->_currentSegment = null;
     }
     if (count($this->_newSegments) != 0 || count($this->_segmentsToDelete) != 0) {
         $this->_updateSegments();
     }
 }