Horde_Pear_Remote::getLatestDownloadUri PHP 메소드

getLatestDownloadUri() 공개 메소드

Retrieve the download location for the latest package release.
public getLatestDownloadUri ( string $package, string $stability = 'stable' ) : string
$package string The package name.
$stability string The stability the release should have. Must be one of "stable", "beta", "alpha", or "devel". The default is "stable" If you explicitely set the $stability parameter to NULL the method will return the download URI for the highest release version independent of the stability.
리턴 string The URI for downloading the release.
    public function getLatestDownloadUri($package, $stability = 'stable')
    {
        if ($latest = $this->getLatestRelease($package, $stability)) {
            return $this->_getRelease($package, $latest)->getDownloadUri();
        } else {
            throw new Horde_Pear_Exception(sprintf('No release of stability "%s" for package "%s".', $stability, $package));
        }
    }

Usage Example

예제 #1
0
파일: Remote.php 프로젝트: jubinpatel/horde
 /**
  * Return the download URI of the component.
  *
  * @return string The download URI.
  */
 private function _getDownloadUri()
 {
     if (!isset($this->_uri)) {
         $this->_uri = $this->_remote->getLatestDownloadUri($this->_name, $this->_stability);
     }
     return $this->_uri;
 }
All Usage Examples Of Horde_Pear_Remote::getLatestDownloadUri