Horde_Pear_Remote::getLatestDetails PHP Method

getLatestDetails() public method

Retrieve the release details for the most stable package version.
public getLatestDetails ( string $package, string $stability = 'stable' ) : Horde_Pear_Rest_Release | boolean
$package string The package name.
$stability string The stability of the release. 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 details for the highest release version independent of the stability.
return Horde_Pear_Rest_Release | boolean The details of the most stable release. Or false if no release was found.
    public function getLatestDetails($package, $stability = 'stable')
    {
        $result = false;
        if ($latest = $this->getLatestRelease($package, $stability)) {
            return $this->_getRelease($package, $latest);
        }
        return $result;
    }

Usage Example

コード例 #1
0
ファイル: Remote.php プロジェクト: jubinpatel/horde
 /**
  * Return a data array with the most relevant information about this
  * component.
  *
  * @return array Information about this component.
  */
 public function getData()
 {
     $data = new stdClass();
     $release = $this->_remote->getLatestDetails($this->_name, null);
     $data->name = $this->_name;
     $data->summary = $release->getSummary();
     $data->description = $release->getDescription();
     $data->version = $release->getVersion();
     $data->releaseDate = (string) $release->da;
     $data->download = $release->getDownloadUri();
     $data->hasCi = $this->_hasCi();
     return $data;
 }
All Usage Examples Of Horde_Pear_Remote::getLatestDetails