/**
  * Prepares config data and checks different conditions like finished mapping.
  */
 protected function __construct()
 {
     //
     $this->Config = PlentymarketsConfig::getInstance();
     $this->StatusController = PlentymarketsExportStatusController::getInstance();
     // Check whether a process is running
     $this->isRunning = (bool) $this->Config->getIsExportRunning(false);
     // If the export is not complete
     if (!$this->isComplete()) {
         // the garbage collector will run
         PlentymarketsGarbageCollector::getInstance()->run(PlentymarketsGarbageCollector::ACTION_MAPPING);
     }
     // Check whether settings and mapping are done
     $this->mayRun = PlentymarketsStatus::getInstance()->mayExport();
 }