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'; }
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'; }