\DeviceAtlas\DataFileDataFileManager

Summary

Methods
Properties
Constants
__construct()
getDownloadedDataFilePath()
downloadDataFile()
persistDataFile()
getDataFile()
isNewFileAvailable()
No public properties found
XMSG_MALFORMED_URL
XMSG_PERSIST_DATA_FILE
No protected methods found
No protected properties found
N/A
No private methods found
$dataFile
$isNewFileAvailable
N/A

Constants

XMSG_MALFORMED_URL

XMSG_MALFORMED_URL = "Could not download data file due to a malformed URL: %s"

XMSG_PERSIST_DATA_FILE

XMSG_PERSIST_DATA_FILE = "Could not rename %s to %s. Please check you have write permissions."

Properties

$dataFile

$dataFile : 

Type

$isNewFileAvailable

$isNewFileAvailable : 

Type

Methods

__construct()

__construct(  $dataFile) 

Parameters

$dataFile
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

getDownloadedDataFilePath()

getDownloadedDataFilePath() : string

If the temporary data file exists on the system return the temporary file path.

If the data file exists return the file path. If the data file does not exist download it and return the temporary path the data file was saved to.

Throws

\DeviceAtlas\Exception\DataLoadingException

Returns

string

downloadDataFile()

downloadDataFile() 

Download data file

Throws

\DeviceAtlas\Exception\DataLoadingException

persistDataFile()

persistDataFile() 

The data file is downloaded into a temporary file. After the temporary file has been loaded by the API without exception this method will replace the existing data file with the temporary file.

Throws

\DeviceAtlas\Exception\DataLoadingException

getDataFile()

getDataFile() 

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

isNewFileAvailable()

isNewFileAvailable() 

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275