Class to store and retrieve the version of Zend Framework.

 Methods

Compare the specified Zend Framework version string $version with the current Zend\Version\Version::VERSION of Zend Framework.

compareVersion(string $version) : int

Parameters

$version

string

A version string (e.g. "0.7.1").

Returns

int-1 if the $version is older, 0 if they are the same, and +1 if $version is newer.

Fetches the version of the latest stable release.

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

Parameters

$service

string

Version Service with which to retrieve the version

Returns

string

Returns true if the running version of Zend Framework is the latest (or newer??) than the latest tag on GitHub, which is returned by static::getLatest().

isLatest() : bool

Returns

bool

 Properties

 

The latest stable version Zend Framework available

$latestVersion : string

 Constants

 

Zend Framework version identification - see compareVersion()

VERSION 

 

Github Service Identifier for version information is retrieved from

VERSION_SERVICE_GITHUB 

 

Zend (framework.zend.com) Service Identifier for version information is retrieved from

VERSION_SERVICE_ZEND