/** * Return file MIME type. * * @return string */ public function getMimeType() { $mimeType = $this->mimeType; if ($this->shouldBeCompressed()) { $mimeType = $this->compressor->getMimeType(); } return $mimeType; }
/** * 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; }