getLatestRelease() public method

Return the latest release for a specific package and stability.
public getLatestRelease ( string $package, string $stability = 'stable' ) : string | boolean
$package string The name of the package.
$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 highest release version independent of the stability.
return string | boolean The latest version for this stability or false if no version with this stability level exists.
コード例 #1
0
ファイル: Remote.php プロジェクト: jubinpatel/horde
 /**
  * Return the version of the component.
  *
  * @return string The component version.
  */
 public function getVersion()
 {
     if (!isset($this->_version)) {
         $this->_version = $this->_remote->getLatestRelease($this->_name, $this->_stability);
     }
     return $this->_version;
 }
コード例 #2
0
ファイル: remote.php プロジェクト: jubinpatel/horde
 *
 * @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";