Example #1
0
 /**
  * Configure the downloader in order to retrieve the correct tarball
  * 
  * @param string $branch
  */
 protected function configureDownloader($branch = NULL)
 {
     if (empty($branch)) {
         $branch = $this->project->getDefaultBranch();
     }
     if (empty($branch)) {
         $branch = self::$default_branch;
     }
     $repo_user = $this->project->getRepository()->getUser();
     $repo_password = $this->project->getRepository()->getPassword();
     if (!empty($repo_user) && !empty($repo_password)) {
         $this->downloader->setUser($repo_user)->setPassword($repo_password);
     }
     $this->downloader->setName($this->project->getName())->setDestination($this->localdata->getExtractDir())->setUrl($this->project->getRepository()->getUrl() . "/{$branch}")->setProgress(!$this->silent_download);
 }