PHP Class FOF30\Update\Collection

Datei anzeigen Open project: akeeba/fof

Public Methods

Method Description
getAllUpdates ( string $url, string $jVersion = null ) : array Reads a "collection" XML update source and returns the complete tree of categories and extensions applicable for platform version $jVersion
getCategories ( string $url, string $jVersion = null ) : array Returns only the category definitions of a collection
getCategoryUpdateSource ( string $url, string $category, string $jVersion = null ) : string | null Returns the update source for a specific category
getExtensionUpdateSource ( string $url, string $type, string $element, string $jVersion = null ) : string | null Get the update source URL for a specific extension, based on the type and element, e.g.
getExtensions ( string $url, string $type = null, string $jVersion = null ) : array | null Get a list of updates for extensions only, optionally of a specific type

Private Methods

Method Description
filterListByPlatform ( array $updates, string $jVersion = null ) : array | null Filters a list of updates, returning only those available for the specified platform version $jVersion

Method Details

getAllUpdates() public method

Reads a "collection" XML update source and returns the complete tree of categories and extensions applicable for platform version $jVersion
public getAllUpdates ( string $url, string $jVersion = null ) : array
$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 array A list of update sources applicable to $jVersion

getCategories() public method

Returns only the category definitions of a collection
public getCategories ( string $url, string $jVersion = null ) : array
$url string The URL of the collection update source
$jVersion string Joomla! version to fetch updates for, or null to use JVERSION
return array An array of category update definitions

getCategoryUpdateSource() public method

Returns the update source for a specific category
public getCategoryUpdateSource ( string $url, string $category, string $jVersion = null ) : string | null
$url string The URL of the collection update source
$category string The category name you want to get the update source URL of
$jVersion string Joomla! version to fetch updates for, or null to use JVERSION
return string | null The update stream URL, or null if it's not found

getExtensionUpdateSource() public method

type=file and element=joomla is Joomla! itself.
public getExtensionUpdateSource ( string $url, string $type, string $element, string $jVersion = null ) : string | null
$url string The URL of the collection update source
$type string The extension type you want to get the update source URL of
$element string The extension element you want to get the update source URL of
$jVersion string Joomla! version to fetch updates for, or null to use JVERSION
return string | null The update source URL or null if the extension is not found

getExtensions() public method

Get a list of updates for extensions only, optionally of a specific type
public getExtensions ( string $url, string $type = null, string $jVersion = null ) : array | null
$url string The URL of the collection update source
$type string The extension type you want to get the update source URL of, empty to get all extension types
$jVersion string Joomla! version to fetch updates for, or null to use JVERSION
return array | null An array of extension update definitions or null if none is found