/**
  * @param DatabaseBackupStrategyModel $databaseStrategyModel
  * @param \DateTime                   $fromDate
  * @param \DateTime                   $untilDate
  *
  * @return FileReportModel[]
  */
 public function getReport(DatabaseBackupStrategyModel $databaseStrategyModel, \DateTime $fromDate, \DateTime $untilDate)
 {
     $fileReader = $this->chainSaver->getSaver($databaseStrategyModel->getFileSaverStrategy());
     $filesFound = [];
     $date = clone $fromDate;
     while ($date->getTimestamp() <= $untilDate->getTimestamp()) {
         $filesPattern = $this->fileNameResolver->resolvePatternForDay($date, 'database', 'tar.xz');
         $filesPatternPath = new Path($filesPattern);
         $filesFound = array_merge($filesFound, $fileReader->listContents($filesPatternPath, clone $date->setTime(0, 0, 0), clone $date->setTime(23, 59, 59)));
         $date->add(new \DateInterval('PT86400S'));
     }
     return $filesFound;
 }
 /**
  * @param DatabaseBackupStrategyModel $configuration
  * @param callable                    $setActionName
  *
  * @throws UnableToProcessException
  *
  * @return File[]
  */
 public function dump(DatabaseBackupStrategyModel $configuration, callable $setActionName)
 {
     /* Dump the database */
     $setActionName('Dumping database...');
     $databaseDumper = $this->chainDatabasesDumper->getDumper($configuration->getDatabaseType());
     $dumpFiles = $databaseDumper->dump($configuration->getDatabaseSettings());
     /* Compress the database */
     $setActionName('Compressing database...');
     $compressor = $this->chainCompressor->getCompressor($configuration->getCompressorStrategy());
     $dumpCompressedFiles = $compressor->compress($dumpFiles);
     /* Save the files */
     $setActionName('Saving files...');
     $saver = $this->chainSaver->getSaver($configuration->getFileSaverStrategy());
     $savedFiles = $saver->save($dumpCompressedFiles);
     return $savedFiles;
 }