LGV_TZ_Lookup 1.4.2
Time zone lookup for PHP applications and HTTP clients
Loading...
Searching...
No Matches
LGV_TZ_Lookup_Setup Class Reference

This prepares a Composer application and its boundary data. More...

Static Public Member Functions

static download (string $url, string $destination)
 Download an HTTPS resource to a local file.
static extract (string $archive, string $destination)
 Extract exactly one GeoJSON entry without using archive paths.
static install (string $directory, string $driver, string $packagePath='', string $version='^1.4')
 Install the library and optional loader, then require its Composer autoloader.
static latestBoundaries (string $directory, ?callable $download=null)
 Discover the latest full boundary release with oceans.
static verifyBoundaries (string $archive, array $asset)
 Verify the archive against the release's size and optional SHA-256 digest.

Public Attributes

const PACKAGE
 The package installed by both command-line tools.

Detailed Description

Definition at line 37 of file Setup.php.

Member Function Documentation

◆ download()

LGV_TZ_Lookup_Setup::download ( string $url,
string $destination )
static
Exceptions
RuntimeExceptionif preparation fails.
Parameters
$urlThe HTTPS resource to download.
$destinationThe local filename to create in the demo's working directory.

Definition at line 76 of file Setup.php.

◆ extract()

LGV_TZ_Lookup_Setup::extract ( string $archive,
string $destination )
static
Exceptions
RuntimeExceptionif preparation fails.
Parameters
$archiveThe downloaded boundary ZIP file.
$destinationThe local GeoJSON filename to create.

Definition at line 107 of file Setup.php.

References if.

◆ install()

LGV_TZ_Lookup_Setup::install ( string $directory,
string $driver,
string $packagePath = '',
string $version = '^1.4' )
static
Exceptions
RuntimeExceptionif preparation fails.

Definition at line 150 of file Setup.php.

References $directory, and $driver.

◆ latestBoundaries()

LGV_TZ_Lookup_Setup::latestBoundaries ( string $directory,
?callable $download = null )
static
Exceptions
RuntimeExceptionif metadata is incomplete.

Definition at line 42 of file Setup.php.

References $directory.

◆ verifyBoundaries()

LGV_TZ_Lookup_Setup::verifyBoundaries ( string $archive,
array $asset )
static

Definition at line 61 of file Setup.php.

Member Data Documentation

◆ PACKAGE

const LGV_TZ_Lookup_Setup::PACKAGE

Definition at line 38 of file Setup.php.


The documentation for this class was generated from the following file: