PHP Class FOF30\Update\Joomla

Inheritance: extends Extension
Show file Open project: akeeba/fof

Protected Properties

Property Type Description
$lts_url string The source for LTS updates
$sts_url string The source for STS updates
$test_url string The source for test release updates

Public Methods

Method Description
filterApplicableUpdates ( array $updates, string $jVersion = null ) : array Filters a list of updates, making sure they apply to the specifed CMS release.
getUpdateSourceFromCollection ( string $url, string $jVersion = null ) : string Reads a "collection" XML update source and picks the correct source URL for the extension update source.
getUpdates ( array $sources = [], string $jVersion = null ) : array Reloads the list of all updates available for the specified Joomla! version from the network.
getVersionProperties ( string $jVersion, string $currentVersion = null ) : array Determines the properties of a version: STS/LTS, normal or testing
sanitiseVersion ( string $version ) : string Joomla! has a lousy track record in naming its alpha, beta and release candidate releases. The convention used seems to be "what the hell the current package maintainer thinks looks better". This method tries to figure out what was in the mind of the maintainer and translate the funky version number to an actual PHP-format version string.

Method Details

filterApplicableUpdates() public method

Filters a list of updates, making sure they apply to the specifed CMS release.
public filterApplicableUpdates ( array $updates, string $jVersion = null ) : array
$updates array A list of update records returned by the getUpdatesFromExtension method
$jVersion string The current Joomla! version number
return array A filtered list of updates. Each update record also includes version relevance information.

getUpdateSourceFromCollection() public method

Reads a "collection" XML update source and picks the correct source URL for the extension update source.
public getUpdateSourceFromCollection ( string $url, string $jVersion = null ) : string
$url string The collection XML update source URL to read from
$jVersion string Joomla! version to fetch updates for, or null to use JVERSION
return string The URL of the extension update source, or empty if no updates are provided / fetching failed

getUpdates() public method

Reloads the list of all updates available for the specified Joomla! version from the network.
public getUpdates ( array $sources = [], string $jVersion = null ) : array
$sources array The enabled sources to look into
$jVersion string The Joomla! version we are checking updates for
return array A list of updates for the installed, current, lts and sts versions

getVersionProperties() public method

Determines the properties of a version: STS/LTS, normal or testing
public getVersionProperties ( string $jVersion, string $currentVersion = null ) : array
$jVersion string The version number to check
$currentVersion string The current Joomla! version number
return array The properties analysis

sanitiseVersion() public method

Joomla! has a lousy track record in naming its alpha, beta and release candidate releases. The convention used seems to be "what the hell the current package maintainer thinks looks better". This method tries to figure out what was in the mind of the maintainer and translate the funky version number to an actual PHP-format version string.
public sanitiseVersion ( string $version ) : string
$version string The whatever-format version number
return string A standard formatted version number

Property Details

$lts_url protected static property

The source for LTS updates
protected static string $lts_url
return string

$sts_url protected static property

The source for STS updates
protected static string $sts_url
return string

$test_url protected static property

The source for test release updates
protected static string $test_url
return string