FOF30\Update\Collection::getExtensions PHP Метод

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
    public function getExtensions($url, $type = null, $jVersion = null)
    {
        $allUpdates = $this->getAllUpdates($url, $jVersion);
        if (empty($type)) {
            return $allUpdates['extensions'];
        } elseif (array_key_exists($type, $allUpdates['extensions'])) {
            return $allUpdates['extensions'][$type];
        } else {
            return null;
        }
    }