Zend\Version\Version
Class to store and retrieve the version of Zend Framework.
Synopsis
class Version
{
- // constants
- const VERSION = '2.3.0';
- const VERSION_SERVICE_GITHUB = 'GITHUB';
- const VERSION_SERVICE_ZEND = 'ZEND';
- // members
- protected string $latestVersion;
- // methods
- public static int compareVersion()
- public static string getLatest()
- public static bool isLatest()
- protected static string|false getApiResponse()
- protected static string|null getLatestFromGithub()
- protected static string|null getLatestFromZend()
Constants
Name | Value |
---|---|
VERSION | '2.3.0' |
VERSION_SERVICE_GITHUB | 'GITHUB' |
VERSION_SERVICE_ZEND | 'ZEND' |
Members
protected
- $latestVersion
—
string
The latest stable version Zend Framework available
Methods
protected
- getApiResponse() — Get the API response to a call from a configured HTTP client
- getLatestFromGithub() — Get the latest version from Github
- getLatestFromZend() — Get the latest version from framework.zend.com
public
- compareVersion() — Compare the specified Zend Framework version string $version with the current Zend\Version\Version::VERSION of Zend Framework.
- getLatest() — Fetches the version of the latest stable release.
- isLatest() — Returns true if the running version of Zend Framework is the latest (or newer??) than the latest tag on GitHub, which is returned by self::getLatest().