Esempio n. 1
0
 /**
  * Create a target.
  *
  * @param  \phpbu\App\Configuration\Backup\Target $conf
  * @return \phpbu\App\Backup\Target
  * @throws \phpbu\App\Exception
  */
 protected function createTarget(Configuration\Backup\Target $conf)
 {
     $target = new Target($conf->dirname, $conf->filename);
     $target->setupPath();
     // add possible compressor
     if (!empty($conf->compression)) {
         $compressor = Compressor::create($conf->compression);
         $target->setCompressor($compressor);
     }
     return $target;
 }