Deviceoptimizer.php

Functions

optimizeDataFile()

optimizeDataFile(  $jsonDataFilePath,   $tempDir = null,   $force = false) 

Optimize a DeviceAtlas JSON data file and populate the cache. The API will use the latest optimized cached files.

Note that when using the API (configured to use optimized data file), when a new data file is passed to the API "loadDataFromFile()" method if the file is not optimized it will automatically be optimized. However this will cause a small lag for the request which the optimization is done at. The bellow function may be used instead.

Parameters

$jsonDataFilePath
$tempDir
$force

clearOptimizationCache()

clearOptimizationCache(  $tempDir = null) 

Clear all files and directories which contain DeviceAtlas cached/temp files.

Parameters

$tempDir

analysePerformance()

analysePerformance(  $jsonDataFilePath,   $tempDir = null) 

Analyse speed and memory performance before.

Parameters

$jsonDataFilePath
$tempDir

analyseOptimizedPerformance()

analyseOptimizedPerformance(  $jsonDataFilePath,   $tempDir = null) 

Parameters

$jsonDataFilePath
$tempDir

getUas()

getUas()