\DeviceAtlasBaseDeviceAtlasApi

Summary

Methods
Properties
Constants
buildDataFile()
loadDataFromFile()
downloadAndLoadDataFileFromUrl()
scheduleReloadAndFinishRequest()
reload()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
checkReloadSchedule()
callFailureCallback()
No private properties found
N/A

Methods

buildDataFile()

buildDataFile(  $dataFileDownloadUrl) 

Parameters

$dataFileDownloadUrl
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

loadDataFromFile()

loadDataFromFile(  $jsonDataFilePath) 

Parameters

$jsonDataFilePath
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

downloadAndLoadDataFileFromUrl()

downloadAndLoadDataFileFromUrl(  $dataFile,   $dataFileManager = null) 

Load the DeviceAtlas data file data from a URL.

Schedule a reload if data file is stale. Re-download data file if local data file is corrupted.

Parameters

$dataFile
$dataFileManager

Throws

\DeviceAtlas\Exception\DataLoadingException

when there is a problem downloading or loading the data file.

scheduleReloadAndFinishRequest()

scheduleReloadAndFinishRequest(  $dataFile,   $dataFileManager) 

A secondary register_shutdown_call to make sure the reload method is called as the last one.

Parameters

$dataFile
$dataFileManager
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

reload()

reload(  $dataFile,   $dataFileManager,   $isScheduled = false) 

Downloads a new data file if the existing one is stale.

Loads data file into API.

Parameters

$dataFile
$dataFileManager
$isScheduled
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

checkReloadSchedule()

checkReloadSchedule(  $dataFile,   $dataFileManager,   $forceReload = false) 

Parameters

$dataFile
$dataFileManager
$forceReload
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

callFailureCallback()

callFailureCallback(\Exception  $ex,   $dataFile) 

Call user defined callback if set.

Parameters

\Exception $ex
$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