[ Index ]

PHP Cross Reference of phpBB-3.2.0-deutsch

title

Body

[close]

/phpbb/ -> version_helper.php (summary)

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: 294 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

version_helper:: (10 methods):
  __construct()
  set_file_location()
  set_current_version()
  force_stability()
  compare()
  is_stable()
  get_latest_on_current_branch()
  get_suggested_updates()
  get_versions_matching_stability()
  get_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)   X-Ref
Constructor

param: \phpbb\cache\service $cache
param: \phpbb\config\config $config
param: \phpbb\file_downloader $file_downloader

set_file_location($host, $path, $file = 'versions.json', $use_ssl = false)   X-Ref
Set location to the file

return: version_helper
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)

set_current_version($version)   X-Ref
Set current version

return: version_helper
param: string $version The current version

force_stability($stability)   X-Ref
Over-ride the stability to force check to include unstable versions

return: version_helper
param: null|string Null to not force stability, 'unstable' or 'stable' to

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

return: mixed                Boolean (true, false) if comparison operator is specified.
param: string $version1        First version number
param: string $version2        Second version number
param: string $operator        Comparison operator (optional)

is_stable($version)   X-Ref
Check whether or not a version is "stable"

Stable means only numbers OR a pl release

return: bool Bool true or false
param: string $version

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

return: string
param: bool $force_update Ignores cached data. Defaults to false.
param: bool $force_cache Force the use of the cache. Override $force_update.

get_suggested_updates($force_update = false, $force_cache = false)   X-Ref
Obtains the latest version information

return: string
param: bool $force_update Ignores cached data. Defaults to false.
param: bool $force_cache Force the use of the cache. Override $force_update.

get_versions_matching_stability($force_update = false, $force_cache = false)   X-Ref
Obtains the latest version information matching the stability of the current install

return: string Version info
param: bool $force_update Ignores cached data. Defaults to false.
param: bool $force_cache Force the use of the cache. Override $force_update.

get_versions($force_update = false, $force_cache = false)   X-Ref
Obtains the latest version information

return: string Version info, includes stable and unstable data
param: bool $force_update Ignores cached data. Defaults to false.
param: bool $force_cache Force the use of the cache. Override $force_update.



Generated: Sun Feb 19 19:47:08 2017 Cross-referenced by PHPXref 0.7.1