Timestamps
in package
Table of Contents
- $contents : mixed
- __construct() : mixed
- save() : bool
- Saves the updated phar file, optionally with an updated signature.
- updateTimestamps() : mixed
- Updates each file's unix timestamps in the PHAR
- determineSignatureBegin() : int
- Determine the beginning of the signature.
- readUint() : mixed
Properties
$contents
private
mixed
$contents
Methods
__construct()
public
__construct(string $file) : mixed
Parameters
- $file : string
-
path to the phar file to use
Return values
mixed —save()
Saves the updated phar file, optionally with an updated signature.
public
save(string $path, int $signatureAlgo) : bool
Parameters
- $path : string
- $signatureAlgo : int
-
One of Phar::MD5, Phar::SHA1, Phar::SHA256 or Phar::SHA512
Return values
bool —updateTimestamps()
Updates each file's unix timestamps in the PHAR
public
updateTimestamps([int|DateTime|string $timestamp = null ]) : mixed
The PHAR signature can then be produced in a reproducible manner.
Parameters
- $timestamp : int|DateTime|string = null
-
Date string or DateTime or unix timestamp to use
Return values
mixed —determineSignatureBegin()
Determine the beginning of the signature.
private
determineSignatureBegin() : int
Return values
int —readUint()
private
readUint(mixed $pos, mixed $bytes) : mixed
Parameters
- $pos : mixed
- $bytes : mixed