PHP Class Airship\Engine\Continuum\Updaters\UpdateFile

Encapsulates an update file (.phar or .zip)
Show file Open project: paragonie/airship Class Usage Examples

Protected Properties

Property Type Description
$hash string
$path string
$size integer
$version string

Public Methods

Method Description
__construct ( array $data ) UpdateFile constructor.
getHash ( ) : string Get the hex-encoded hash of the file contents
getPath ( ) : string Get the name of the 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?

Method Details

__construct() public method

UpdateFile constructor.
public __construct ( array $data )
$data array

getHash() public method

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

getPath() public method

Get the name of the file
public getPath ( ) : 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

Property Details

$hash protected property

protected string $hash
return string

$path protected property

protected string $path
return string

$size protected property

protected int $size
return integer

$version protected property

protected string $version
return string