compareVersion()
getLatest()
isLatest()
$latestVersion
VERSION
VERSION_SERVICE_GITHUB
VERSION_SERVICE_ZEND
Class to store and retrieve the version of Zend Framework.
compareVersion(string $version) : int
string
A version string (e.g. "0.7.1").
int
-1 if the $version is older, 0 if they are the same, and +1 if $version is newer.getLatest(string $service) : string
By default, this uses the API provided by framework.zend.com for version retrieval.
If $service is set to VERSION_SERVICE_GITHUB, this will use the GitHub API (v3) and only returns refs that begin with * 'tags/release-'. Because GitHub returns the refs in alphabetical order, we need to reduce the array to a single value, comparing the version numbers with version_compare().
see | \Zend\Version\http://developer.github.com/v3/git/refs/#get-all-references |
---|---|
link | https://api.github.com/repos/zendframework/zf2/git/refs/tags/release- |
link | http://framework.zend.com/api/zf-version?v=2 |
string
Version Service with which to retrieve the version
string
isLatest() : bool
bool
$latestVersion : string
VERSION
VERSION_SERVICE_GITHUB
VERSION_SERVICE_ZEND