예제 #1
0
 public function findPeclPackageUrl($packageName, $version = 'stable')
 {
     $channel = new PEARX\Channel($this->pecl);
     $xml = $channel->fetchPackageReleaseXml($packageName, $version);
     $g = $xml->getElementsByTagName('g');
     $url = $g->item(0)->nodeValue;
     // just use tgz format file.
     return $url . '.tgz';
 }
예제 #2
0
 public function buildPackageDownloadUrl($version = 'stable')
 {
     if ($this->getPackageName() == NULL) {
         throw new Exception("Repository invalid.");
     }
     $channel = new PeclChannel($this->site);
     $xml = $channel->fetchPackageReleaseXml($this->getPackageName(), $version);
     $g = $xml->getElementsByTagName('g');
     $url = $g->item(0)->nodeValue;
     // just use tgz format file.
     return $url . '.tgz';
 }