| [ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Source view] [Print] [Project Stats]
This file is part of the phpBB Forum Software package.
| Copyright: | (c) phpBB Limited |
| License: | GNU General Public License, version 2 (GPL-2.0) |
| File Size: | 520 lines (15 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
version_helper:: (13 methods):
__construct()
set_file_location()
set_current_version()
force_stability()
compare()
is_stable()
get_latest_on_current_branch()
get_update_on_branch()
get_ext_update_on_branch()
get_suggested_updates()
get_versions_matching_stability()
get_versions()
validate_versions()
Class: version_helper - X-Ref
Class to handle version checking and comparison| __construct(\phpbb\cache\service $cache, \phpbb\config\config $config, \phpbb\file_downloader $file_downloader, \phpbb\user $user) X-Ref |
| Constructor param: \phpbb\cache\service $cache param: \phpbb\config\config $config param: \phpbb\file_downloader $file_downloader param: \phpbb\user $user |
| set_file_location($host, $path, $file = 'versions.json', $use_ssl = false) X-Ref |
| Set location to the file param: string $host Host (e.g. version.phpbb.com) param: string $path Path to file (e.g. /phpbb) param: string $file File name (Default: versions.json) param: bool $use_ssl Use SSL or not (Default: false) return: version_helper |
| set_current_version($version) X-Ref |
| Set current version param: string $version The current version return: version_helper |
| force_stability($stability) X-Ref |
| Over-ride the stability to force check to include unstable versions param: null|string Null to not force stability, 'unstable' or 'stable' to return: version_helper |
| compare($version1, $version2, $operator = null) X-Ref |
| 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 param: string $version1 First version number param: string $version2 Second version number param: string $operator Comparison operator (optional) return: mixed Boolean (true, false) if comparison operator is specified. |
| is_stable($version) X-Ref |
| Check whether or not a version is "stable" Stable means only numbers OR a pl release param: string $version return: bool Bool true or false |
| get_latest_on_current_branch($force_update = false, $force_cache = false) X-Ref |
| Gets the latest version for the current branch the user is on param: bool $force_update Ignores cached data. Defaults to false. param: bool $force_cache Force the use of the cache. Override $force_update. return: string |
| get_update_on_branch($force_update = false, $force_cache = false) X-Ref |
| Gets the latest update for the current branch the user is on Will suggest versions from newer branches when EoL has been reached and/or version from newer branch is needed for having all known security issues fixed. param: bool $force_update Ignores cached data. Defaults to false. param: bool $force_cache Force the use of the cache. Override $force_update. return: array Version info or empty array if there are no updates |
| get_ext_update_on_branch($force_update = false, $force_cache = false) X-Ref |
| Gets the latest extension update for the current phpBB branch the user is on Will suggest versions from newer branches when EoL has been reached and/or version from newer branch is needed for having all known security issues fixed. param: bool $force_update Ignores cached data. Defaults to false. param: bool $force_cache Force the use of the cache. Override $force_update. return: array Version info or empty array if there are no updates |
| get_suggested_updates($force_update = false, $force_cache = false) X-Ref |
| Obtains the latest version information param: bool $force_update Ignores cached data. Defaults to false. param: bool $force_cache Force the use of the cache. Override $force_update. return: array |
| get_versions_matching_stability($force_update = false, $force_cache = false) X-Ref |
| Obtains the latest version information matching the stability of the current install param: bool $force_update Ignores cached data. Defaults to false. param: bool $force_cache Force the use of the cache. Override $force_update. return: array Version info |
| get_versions($force_update = false, $force_cache = false) X-Ref |
| Obtains the latest version information param: bool $force_update Ignores cached data. Defaults to false. param: bool $force_cache Force the use of the cache. Override $force_update. return: array Version info, includes stable and unstable data |
| validate_versions($versions_info) X-Ref |
| Validate versions info input param: array $versions_info Decoded json data array. Will be modified return: array Versions info array |
| Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |