PHP Класс FOF30\Update\Collection

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
filterListByPlatform ( array $updates, string $jVersion = null ) : array | null Filters a list of updates, returning only those available for the specified platform version $jVersion

Описание методов

getAllUpdates() публичный Метод

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
Результат array A list of update sources applicable to $jVersion

getCategories() публичный Метод

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
Результат array An array of category update definitions

getCategoryUpdateSource() публичный Метод

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
Результат string | null The update stream URL, or null if it's not found

getExtensionUpdateSource() публичный Метод

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
Результат string | null The update source URL or null if the extension is not found

getExtensions() публичный Метод

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
Результат array | null An array of extension update definitions or null if none is found