PHP Class Airship\Engine\Continuum\Updaters\Gadget

This updates a Gadget.
Inheritance: extends AutoUpdater, implements ContinuumInterface
Show file Open project: paragonie/airship

Protected Properties

Property Type Description
$cabin array
$ext string

Public Methods

Method Description
__construct ( Hail $hail, array $manifest = [], Supplier $supplier = null, string $filePath = '' ) Gadget constructor.
autoUpdate ( ) Process automatic updates:
setCabin ( string $supplier, string $name ) : self Store cabin association
updateJSON ( UpdateInfo $info, array $metaData = [] ) Update the version identifier stored in the gadgets.json file

Protected Methods

Method Description
install ( UpdateInfo $info, UpdateFile $file ) We just need to replace the Phar

Method Details

__construct() public method

Gadget constructor.
public __construct ( Hail $hail, array $manifest = [], Supplier $supplier = null, string $filePath = '' )
$hail Hail
$manifest array
$supplier Supplier
$filePath string

autoUpdate() public method

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 autoUpdate ( )

install() protected method

If we get to this point: 1. We know the signature is signed by the supplier. 2. The hash was checked into Keyggdrasil, which was independently vouched for by our peers.
protected install ( UpdateInfo $info, UpdateFile $file )
$info UpdateInfo
$file UpdateFile

setCabin() public method

Store cabin association
public setCabin ( string $supplier, string $name ) : self
$supplier string
$name string
return self

updateJSON() public method

Update the version identifier stored in the gadgets.json file
public updateJSON ( UpdateInfo $info, array $metaData = [] )
$info UpdateInfo
$metaData array

Property Details

$cabin protected property

protected array $cabin
return array

$ext protected property

protected string $ext
return string