Beispiel #1
0
 /**
  * @return bool
  */
 public function perform()
 {
     $documents = $this->helper->getDocumentList();
     $this->progressBar->start(1);
     $oldDestinationRecordsCount = $this->helper->getDestinationRecordsCount();
     $newDestinationRecordsCount = $this->destination->getRecordsCount($documents[MapInterface::TYPE_DEST]) - $oldDestinationRecordsCount;
     if ($newDestinationRecordsCount != 0) {
         $this->errors[] = 'Mismatch of entities in the document: ' . $documents[MapInterface::TYPE_DEST];
     }
     $this->progressBar->finish();
     return $this->checkForErrors();
 }
 /**
  * @return int
  */
 protected function getIterationsCount()
 {
     $iterations = 0;
     $document = $this->helper->getDocumentList();
     $iterations += $this->source->getRecordsCount($document['source']);
     return $iterations;
 }
 /**
  * Get iterations count for step
  *
  * @return int
  */
 protected function getIterationsCount()
 {
     return count($this->helper->getSourceFields()) + count($this->helper->getDestinationFields());
 }