/**
  * Stores the restore config as yml and by given name defined in job
  *
  * @param RestoreJob $job
  * @param array $data
  * @author Daniel Wendlandt
  */
 public function storeRestoreConfig(RestoreJob $job, array $data)
 {
     $filepath = $job->getPath() . DIRECTORY_SEPARATOR . self::DIR_CONFIG . DIRECTORY_SEPARATOR . $job->getConfigName() . self::FILE_EXTENSION_CONFIG;
     $this->filesytsem->dumpFile($filepath, $this->yamlDumper->dump($data, 5));
 }
 /**
  * Stores config to yml config
  *
  * @param RestoreJob $job
  * @param OutputInterface $output
  * @author Daniel Wendlandt
  */
 private function storeConfig(RestoreJob $job, OutputInterface $output)
 {
     $mappingActions = array();
     foreach ($job->getStrategy()->getMappings() as $types) {
         /** @var RestoreStrategy\MappingAction $mappingAction */
         foreach ($types as $mappingAction) {
             $mappingActions[] = $mappingAction->toArray();
         }
     }
     $config = array('name' => $job->getName(), 'source' => $job->getSource(), 'host' => $job->getHost(), 'port' => $job->getPort(), 'create_config' => $job->isCreateConfig(), 'config_name' => $job->getConfigName(), 'strategy' => array('strategy' => $job->getStrategy()->getStrategy(), 'mappings' => $mappingActions), 'created_at' => $job->getCreatedAt()->format('Y-m-d H:i:s'));
     $this->filesystem->storeRestoreConfig($job, $config);
     $output->writeln('<info>*** Stored restore-config to file in yaml format ***</info>' . PHP_EOL);
 }