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. |
리턴 | Horde_Pear_Rest_Release | boolean | The details of the most stable release. Or false if no release was found. |
/** * 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; }
* * @category Horde * @package Horde_Pear * @author Gunnar Wrobel <*****@*****.**> * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 * @link http://www.horde.org/libraries/Horde_Pear */ /** * The Autoloader allows us to omit "require/include" statements. */ require_once 'Horde/Autoloader/Default.php'; $pear = new Horde_Pear_Remote(); print $pear->getChannel(); print "\n\n"; print join("\n", $pear->listPackages()); print "\n\n"; print $pear->getLatestRelease('Horde_Core'); print "\n\n"; print $pear->getLatestDownloadUri('Horde_Core'); print "\n\n"; print_r($pear->getLatestDetails('Horde_Core')); print "\n\n"; print $pear->releaseExists('Horde_Core', '1.7.0'); print "\n\n"; print count($pear->getDependencies('Horde_Exception', '1.0.0')); print "\n\n"; print $pear->getPackageXml('Horde_Exception', '1.0.0')->getName(); print "\n\n"; $pear = new Horde_Pear_Remote('pear.phpunit.de'); print join("\n", $pear->listPackages()); print "\n\n";