PHP Класс Airship\Engine\Continuum\AutoUpdater

The base class for the auto-updaters.
Наследование: use trait LogBolt
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$bypassSecurityAndJustInstall boolean
$channels Channel[]
$continuumLogger Log
$ext string
$filePath string
$hail Hail
$localUpdateFile UpdateFile
$manifest array
$name string
$pharAlias string
$supplier Supplier
$type string

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

Метод Описание
bypassSecurityAndJustInstall ( boolean $set = false ) : self This is for manual installations and update scripts. It should never be invoked automatically.
checkKeyggdrasil ( UpdateInfo $info, UpdateFile $file ) : boolean Was the checksum of this update stored in Keyggdrasil?
downloadUpdateFile ( UpdateInfo $update, string $apiEndpoint = 'download' ) : UpdateFile Download an update into a temp file
manualUpdate ( string $desiredVersion ) : boolean Process manual updates:
updateCheck ( string $supplier = '', string $packageName = '', string $minVersion = '', string $apiEndpoint = 'version' ) : array Are any updates available?
updateDBRecord ( string $type, UpdateInfo $info ) : boolean Update the version string in airship_package_cache
useLocalUpdateFile ( string $path, string $version = '' ) : self For CLI usage: Bypass the download process, use a local file instead.
verifyUpdateSignature ( UpdateInfo $info, UpdateFile $file ) : boolean Verify the Ed25519 signature of the update file against the supplier's public key.

Защищенные методы

Метод Описание
autoRunScript ( array $autoRun ) : mixed Automatic script execution
bringSiteBackUp ( ) After we finish our update, we should bring the site back online:
bringSiteDown ( ) Let's bring the site down while we're upgrading:
checkVersionSettings ( UpdateInfo $info, string $currentVersion ) : boolean Should this automatic update be permitted?
getChannel ( string $name ) : Channel Get the channels
getLogContext ( UpdateInfo $updateInfo, UpdateFile $updateFile ) : array Get information for logging purposes
install ( UpdateInfo $info, UpdateFile $file ) This is the method that actually does the installation
sortUpdatesByVersion ( variadic $updates ) : array Sort updates by version (newest to latest)

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

autoRunScript() защищенный Метод

Automatic script execution
protected autoRunScript ( array $autoRun ) : mixed
$autoRun array
Результат mixed

bringSiteBackUp() защищенный Метод

After we finish our update, we should bring the site back online:
protected bringSiteBackUp ( )

bringSiteDown() защищенный Метод

Let's bring the site down while we're upgrading:
protected bringSiteDown ( )

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

This is for manual installations and update scripts. It should never be invoked automatically.
public bypassSecurityAndJustInstall ( boolean $set = false ) : self
$set boolean
Результат self

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

Dear future security auditors: This is important.
public checkKeyggdrasil ( UpdateInfo $info, UpdateFile $file ) : boolean
$info UpdateInfo
$file UpdateFile
Результат boolean

checkVersionSettings() защищенный Метод

Should this automatic update be permitted?
protected checkVersionSettings ( UpdateInfo $info, string $currentVersion ) : boolean
$info UpdateInfo
$currentVersion string
Результат boolean

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

Download an update into a temp file
public downloadUpdateFile ( UpdateInfo $update, string $apiEndpoint = 'download' ) : UpdateFile
$update UpdateInfo
$apiEndpoint string
Результат UpdateFile

getChannel() защищенный Метод

Get the channels
protected getChannel ( string $name ) : Channel
$name string
Результат Channel

getLogContext() защищенный Метод

Get information for logging purposes
protected getLogContext ( UpdateInfo $updateInfo, UpdateFile $updateFile ) : array
$updateInfo UpdateInfo
$updateFile UpdateFile
Результат array

install() абстрактный защищенный Метод

This is the method that actually does the installation
abstract protected install ( UpdateInfo $info, UpdateFile $file )
$info UpdateInfo
$file UpdateFile

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

1. Check if a new update is available. 2. Download the upload file, store in a temporary file. 3. Verify the signature (via Halite). 4. Verify the update is recorded in Keyggdrasil. 5. If all is well, run the update script.
public manualUpdate ( string $desiredVersion ) : boolean
$desiredVersion string
Результат boolean

sortUpdatesByVersion() защищенный Метод

Sort updates by version (newest to latest)
protected sortUpdatesByVersion ( variadic $updates ) : array
$updates variadic
Результат array

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

Are any updates available?
public updateCheck ( string $supplier = '', string $packageName = '', string $minVersion = '', string $apiEndpoint = 'version' ) : array
$supplier string
$packageName string
$minVersion string
$apiEndpoint string
Результат array

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

Update the version string in airship_package_cache
public updateDBRecord ( string $type, UpdateInfo $info ) : boolean
$type string
$info UpdateInfo
Результат boolean

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

For CLI usage: Bypass the download process, use a local file instead.
public useLocalUpdateFile ( string $path, string $version = '' ) : self
$path string
$version string
Результат self

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

Dear future security auditors: This is important.
public verifyUpdateSignature ( UpdateInfo $info, UpdateFile $file ) : boolean
$info UpdateInfo
$file UpdateFile
Результат boolean

Описание свойств

$bypassSecurityAndJustInstall защищенное свойство

protected bool $bypassSecurityAndJustInstall
Результат boolean

$channels защищенное статическое свойство

protected static Channel[],Airship\Engine\Continuum $channels
Результат Channel[]

$continuumLogger защищенное статическое свойство

protected static Log,Airship\Engine\Continuum $continuumLogger
Результат Log

$ext защищенное свойство

protected string $ext
Результат string

$filePath защищенное свойство

protected string $filePath
Результат string

$hail защищенное свойство

protected Hail $hail
Результат Hail

$localUpdateFile защищенное свойство

protected UpdateFile $localUpdateFile
Результат UpdateFile

$manifest защищенное свойство

protected array $manifest
Результат array

$name защищенное свойство

protected string $name
Результат string

$pharAlias защищенное свойство

protected string $pharAlias
Результат string

$supplier защищенное свойство

protected Supplier,Airship\Engine\Continuum $supplier
Результат Supplier

$type защищенное свойство

protected string $type
Результат string