PHP Класс Platformsh\Cli\SelfUpdate\ManifestStrategy

Наследование: implements Humbug\SelfUpdate\Strategy\StrategyInterface
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( string $localVersion, string $manifestUrl, boolean $allowMajor = false, boolean $allowUnstable = false ) ManifestStrategy constructor.
download ( Humbug\SelfUpdate\Updater $updater )
getCurrentLocalVersion ( Humbug\SelfUpdate\Updater $updater )
getCurrentRemoteVersion ( Humbug\SelfUpdate\Updater $updater )
getUpdateNotes ( Humbug\SelfUpdate\Updater $updater ) : string | false Find update/upgrade notes for the new remote version.
setManifestTimeout ( integer $manifestTimeout )

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

Метод Описание
filterByLocalMajorVersion ( array $versions ) : string[] Filter a list of versions to those that match the current local version.
filterByPhpVersion ( array $versions ) : string[] Filter a list of versions to those that allow the current PHP version.
getAvailableVersions ( ) : array Get available versions to update to.
getManifest ( ) : array Download and decode the JSON manifest file.
getRemoteVersionInfo ( Humbug\SelfUpdate\Updater $updater ) : array Get version information for the latest remote version.

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

__construct() публичный метод

ManifestStrategy constructor.
public __construct ( string $localVersion, string $manifestUrl, boolean $allowMajor = false, boolean $allowUnstable = false )
$localVersion string The local version.
$manifestUrl string The URL to a JSON manifest file. The manifest contains an array of objects, each containing a 'version', 'sha1', and 'url'.
$allowMajor boolean Whether to allow updating between major versions.
$allowUnstable boolean Whether to allow updating to an unstable version. Ignored if $localVersion is unstable and there are no new stable versions.

download() публичный метод

public download ( Humbug\SelfUpdate\Updater $updater )
$updater Humbug\SelfUpdate\Updater

getCurrentLocalVersion() публичный метод

public getCurrentLocalVersion ( Humbug\SelfUpdate\Updater $updater )
$updater Humbug\SelfUpdate\Updater

getCurrentRemoteVersion() публичный метод

public getCurrentRemoteVersion ( Humbug\SelfUpdate\Updater $updater )
$updater Humbug\SelfUpdate\Updater

getUpdateNotes() публичный метод

Find update/upgrade notes for the new remote version.
public getUpdateNotes ( Humbug\SelfUpdate\Updater $updater ) : string | false
$updater Humbug\SelfUpdate\Updater
Результат string | false A string if notes are found, or false otherwise.

setManifestTimeout() публичный метод

public setManifestTimeout ( integer $manifestTimeout )
$manifestTimeout integer