PHP Class Airship\Engine\Continuum\Installers\InstallFile

All of the information pertinent to a file we are installing.
Show file Open project: paragonie/airship Class Usage Examples

Protected Properties

Property Type Description
$hash string
$path string
$releaseInfo array
$size integer
$supplier Airship\Engine\Continuum\Supplier
$version string

Public Methods

Method Description
__construct ( Supplier $supplier, array $data ) InstallFile constructor.
getHash ( ) : string Get the hex-encoded hash of the file contents
getMerkleRoot ( ) : string Get the Merkle root that matches this version's release
getPath ( ) : string Get the name of the file
getSignature ( ) : string Get the hex-encoded signature for this file.
getSize ( ) : integer Get the size of the file
getVersion ( ) : string Get the version of a particular update file.
hashMatches ( string $hash ) : boolean Does the given hash match the file?
signatureIsValid ( boolean $fastExit = false ) : boolean Check that the signature is valid for this supplier's public keys.

Method Details

__construct() public method

InstallFile constructor.
public __construct ( Supplier $supplier, array $data )
$supplier Airship\Engine\Continuum\Supplier
$data array

getHash() public method

Get the hex-encoded hash of the file contents
public getHash ( ) : string
return string

getMerkleRoot() public method

Get the Merkle root that matches this version's release
public getMerkleRoot ( ) : string
return string

getPath() public method

Get the name of the file
public getPath ( ) : string
return string

getSignature() public method

Get the hex-encoded signature for this file.
public getSignature ( ) : string
return string

getSize() public method

Get the size of the file
public getSize ( ) : integer
return integer

getVersion() public method

Get the version of a particular update file.
public getVersion ( ) : string
return string

hashMatches() public method

Does the given hash match the file?
public hashMatches ( string $hash ) : boolean
$hash string
return boolean

signatureIsValid() public method

Check that the signature is valid for this supplier's public keys.
public signatureIsValid ( boolean $fastExit = false ) : boolean
$fastExit boolean
return boolean

Property Details

$hash protected property

protected string $hash
return string

$path protected property

protected string $path
return string

$releaseInfo protected property

protected array $releaseInfo
return array

$size protected property

protected int $size
return integer

$supplier protected property

protected Supplier,Airship\Engine\Continuum $supplier
return Airship\Engine\Continuum\Supplier

$version protected property

protected string $version
return string