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

This facilitates the installation process of a new Cabin, Gadget, or Motif.
Наследование: use trait SupplierBolt, use trait LogBolt
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$bypassSecurityAndJustInstall boolean
$continuumLogger Log
$ext
$hail Hail
$localInstallFile InstallFile
$package string
$supplier Supplier
$type string

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

Метод Описание
__construct ( Hail $hail = null, string $supplier = '', string $package = '' ) Installer constructor.
bypassSecurityAndJustInstall ( boolean $set = false ) : self This is for manual installations and update scripts. It should never be invoked automatically.
clearCache ( ) : boolean We just need to clear the template caches and the cabin data.
download ( array $update = [] ) : InstallFile Download the file from the update server.
easyInstall ( ) : boolean Attempts to download and install in one go.
expandCabinName ( string $cabinName ) : string Is this a special Airship cabin? Return just the name.
getLogContext ( InstallFile $installFile ) : array Get information for logging purposes
getPackageData ( string $minVersion = '' ) : array Get metadata about the package we're installing.
install ( InstallFile $fileInfo ) : boolean Install the file. This is type-specific, so we leave it abstract here.
markPackageInstalled ( InstallFile $install ) : boolean Somewhat self-explanatory. This just sets the 'installed' column in the database to 'TRUE' so our web UI knows that it's installed.
useLocalInstallFile ( string $path, string $version = '' ) : self For CLI usage: Bypass the download process, use a local file instead.
verifyChecksum ( InstallFile $file ) : boolean Verify that the file has not modified since it was stored
verifyMerkleRoot ( InstallFile $file ) : boolean Verifies that the Merkle root exists, matches this package and version, and has the same checksum as the one we calculated.
verifySignature ( InstallFile $file ) : boolean Verify that the signature matches

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

Метод Описание
getChannel ( string $name ) : Channel Get the channels (cache across all instances of Installer)

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

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

Installer constructor.
public __construct ( Hail $hail = null, string $supplier = '', string $package = '' )
$hail Hail
$supplier string
$package string

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

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

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

We just need to clear the template caches and the cabin data.
public clearCache ( ) : boolean
Результат boolean

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

Download the file from the update server.
public download ( array $update = [] ) : InstallFile
$update array
Результат InstallFile

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

Attempts to download and install in one go.
public easyInstall ( ) : boolean
Результат boolean Was it successful?

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

Otherwise, return the namespace.
public expandCabinName ( string $cabinName ) : string
$cabinName string
Результат string

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

Get the channels (cache across all instances of Installer)
protected getChannel ( string $name ) : Channel
$name string
Результат Channel

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

Get information for logging purposes
public getLogContext ( InstallFile $installFile ) : array
$installFile InstallFile
Результат array

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

Get metadata about the package we're installing.
public getPackageData ( string $minVersion = '' ) : array
$minVersion string
Результат array

install() абстрактный публичный Метод

Install the file. This is type-specific, so we leave it abstract here.
abstract public install ( InstallFile $fileInfo ) : boolean
$fileInfo InstallFile
Результат boolean

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

Somewhat self-explanatory. This just sets the 'installed' column in the database to 'TRUE' so our web UI knows that it's installed.
public markPackageInstalled ( InstallFile $install ) : boolean
$install InstallFile
Результат boolean

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

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

verifyChecksum() публичный статический Метод

Verify that the file has not modified since it was stored
public static verifyChecksum ( InstallFile $file ) : boolean
$file InstallFile
Результат boolean

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

Verifies that the Merkle root exists, matches this package and version, and has the same checksum as the one we calculated.
public verifyMerkleRoot ( InstallFile $file ) : boolean
$file InstallFile
Результат boolean

verifySignature() публичный статический Метод

Verify that the signature matches
public static verifySignature ( InstallFile $file ) : boolean
$file InstallFile
Результат boolean

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

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

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

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

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

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

protected $ext

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

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

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

protected InstallFile $localInstallFile
Результат InstallFile

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

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

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

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

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

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