class version_helper
Class to handle version checking and comparison
Methods
__construct(service $cache, config $config, file_downloader $file_downloader)
Constructor |
||
version_helper |
set_file_location(string $host, string $path, string $file = 'versions.json', bool $use_ssl = false)
Set location to the file |
|
version_helper |
set_current_version(string $version)
Set current version |
|
version_helper |
force_stability(null|string $stability)
Over-ride the stability to force check to include unstable versions |
|
mixed |
compare(string $version1, string $version2, string $operator = null)
Wrapper for version_compare() that allows using uppercase A and B for alpha and beta releases. |
|
bool |
is_stable(string $version)
Check whether or not a version is "stable" |
|
string |
get_latest_on_current_branch(bool $force_update = false, bool $force_cache = false)
Gets the latest version for the current branch the user is on |
|
string |
get_suggested_updates(bool $force_update = false, bool $force_cache = false)
Obtains the latest version information |
|
string |
get_versions_matching_stability(bool $force_update = false, bool $force_cache = false)
Obtains the latest version information matching the stability of the current install |
|
string |
get_versions(bool $force_update = false, bool $force_cache = false)
Obtains the latest version information |
Details
at line 70
public
__construct(service $cache, config $config, file_downloader $file_downloader)
Constructor
at line 93
public version_helper
set_file_location(string $host, string $path, string $file = 'versions.json', bool $use_ssl = false)
Set location to the file
at line 109
public version_helper
set_current_version(string $version)
Set current version
at line 123
public version_helper
force_stability(null|string $stability)
Over-ride the stability to force check to include unstable versions
at line 143
public mixed
compare(string $version1, string $version2, string $operator = null)
Wrapper for version_compare() that allows using uppercase A and B for alpha and beta releases.
See http://www.php.net/manual/en/function.version-compare.php
at line 156
public bool
is_stable(string $version)
Check whether or not a version is "stable"
Stable means only numbers OR a pl release
at line 177
public string
get_latest_on_current_branch(bool $force_update = false, bool $force_cache = false)
Gets the latest version for the current branch the user is on
at line 208
public string
get_suggested_updates(bool $force_update = false, bool $force_cache = false)
Obtains the latest version information
at line 229
public string
get_versions_matching_stability(bool $force_update = false, bool $force_cache = false)
Obtains the latest version information matching the stability of the current install
at line 249
public string
get_versions(bool $force_update = false, bool $force_cache = false)
Obtains the latest version information