PHP 클래스 Airship\Engine\Continuum\AutoUpdater

The base class for the auto-updaters.
상속: use trait LogBolt
파일 보기 프로젝트 열기: paragonie/airship

보호된 프로퍼티들

프로퍼티 타입 설명
$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