protected function getTargetName(PackageInterface $package, $format, $fileName = null)
 {
     if (null === $fileName) {
         $packageName = $this->manager->getPackageFilename($package);
     } else {
         $packageName = $fileName;
     }
     $target = $this->targetDir . '/' . $packageName . '.' . $format;
     return $target;
 }
Example #2
0
 /**
  * @param  Config                     $config The configuration
  * @param  Downloader\DownloadManager $dm     Manager use to download sources
  * @return Archiver\ArchiveManager
  */
 public function createArchiveManager(Config $config, Downloader\DownloadManager $dm = null)
 {
     if (null === $dm) {
         $io = new IO\NullIO();
         $io->loadConfiguration($config);
         $dm = $this->createDownloadManager($io, $config);
     }
     $am = new Archiver\ArchiveManager($dm);
     $am->addArchiver(new Archiver\PharArchiver());
     return $am;
 }