The default cookie name that the client side properties would be set to. When using getProperties() in a web application, the detection would automatically use the contents of this cookie if it exists. If you want the client side properties to be used add the DeviceAtlas client side component (JS lib) to your web-site pages.
The default config value for getProperties(HEADERS) or getProperties(REQUEST) to check the Accept-Language header and include properties to the property set for getting client's language and locale preferences.
The default config value for getProperties() to include the matched and unmatched parts of the User-Agent to the property set.
The default config value for getProperties() to include User-Agent dynamic properties.
The default config value for getProperties() return value when there was no properties. true = if no properties return null, false = if no property return an instance of Properties with no Property inside it.
Mobi_Mtld_DA_CacheProvider_CacheProviderInterface $obj->getCacheProvider()
Get the cache provider instance being used by the API to cache the lookup results. null is returned when a cache provider is not used.
string $obj->getCookieName()
Get the cookie name that the client side properties would be set to.
When using getProperties() in a web application, the detection would
automatically use the contents of this cookie if it exists. If you want
the client side properties to be used add the DeviceAtlas client side
component (JS lib) to your web-site pages.
When the user-agent or HTTP headers are set manually to getProperties()
the client side properties (probably the value set to the cookie)
can be manually passed to this methods as the second argument, note that
this config is only used for getProperties(REQUEST-OBJECT).
boolean $obj->getIgnoreDataFileChanges()
Get if the data file optimizer should do data file update automatic checking.
bool $obj->getIncludeLangProps()
Get if the language/locale properties are being included in the property set or not.
bool $obj->getIncludeMatchInfo()
To get if getProperties() include the matched and unmatched parts of the User-Agent to the property set.
boolean $obj->getIncludeUaProps()
Get if the User-Agent properties are being included in the property set or not.
string $obj->getOptimizerTempDir()
Get the temp directory path in which the optimizer puts the cached files.
bool $obj->getReturnNullWhenNoProperties()
Get if the value returned by getProperties() should be null when there are no properties to return or an instance of Properties that has no Property inside it should be returned.
bool $obj->getUseTreeOptimizer()
To get data optimization status. Optimizing the data file will dramatically reduce the
memory foot print and data file loading speed. It is highly recommend to
turn this config on when detecting devices in real-time using DeviceAtlasWeb.
When this config is on, the API will automatically divide the data file into
smaller pieces and cache them on the disk, the cached data will be used for
lookups afterwards. The API detects data file updates and will update the cache.
void $obj->setCacheProvider( Mobi_Mtld_DA_CacheProvider_CacheProviderInterface cacheProvider )
Set a cache provider to the API to cache the lookup results. This will dramatically increase the lookup performance in most situations. It is highly recommend to use this config when detecting devices in real-time using DeviceAtlasWeb.
void $obj->setCookieName(string cookieName)
To change the cookie name that the client side properties would be set to.
When using getProperties() in a web application, the detection would
automatically use the contents of this cookie if it exists. If you want
the client side properties to be used add the DeviceAtlas client side
component (JS lib) to your web-site pages.
When the user-agent or HTTP headers are set manually to getProperties()
the client side properties (probably the value set to the cookie) can be
manually passed to this methods as the second argument, note that this
config is only used for getProperties(REQUEST-OBJECT). If you set the
cookie-name to null then the client-side properties cookie will be ignored.
void $obj->setIgnoreDataFileChanges(bool ignoreDataFileChanges)
When data file optimizer is set to true using the "setUseTreeOptimizer()" config, the API will try to use a batch of optimized cached files instead of the original data file, the API will do several checks to pick between the cached data file or the passed data file. While this makes the API automatically sense and update the cached files. However if you manually update the optimizer caches using the provided CLI tool (ExtraTools/DeviceApi/data-file-optimizer.php) the checking is redundant and unnecessary, using this setting you can turn this checking off.
void $obj->setIncludeLangProps(bool includeLangProps)
To disable or enable getProperties(HEADERS) or getProperties(REQUEST) including language and locale properties. To check the Accept-Language header and include properties to the property set for getting client's language and locale preferences set to true. If you do not use this properties you can set this config to false to make the detection marginally faster.
void $obj->setIncludeMatchInfo(bool includeMatchInfo)
To disable or enable getProperties() including the matched and unmatched parts of the User-Agent to the property set.
void $obj->setIncludeUaProps(bool includeUaProps)
To disable or enable getProperties(HEADERS) or getProperties(REQUEST) including language and locale properties. To check the Accept-Language header and include properties to the property set for getting client's language and locale preferences set to true. If you do not use this properties you can set this config to false to make the detection marginally faster.
void $obj->setOptimizerTempDir(string optimizerTempDir)
When optimizer is turned on, the cached files will be put inside the system directory by default, you can change the default optimizer temp/cache directory with this method.
void $obj->setReturnNullWhenNoProperties(bool returnNullWhenNoProperties)
Set if the value returned by the getProperties() method should be null when there are no properties to return or whether an empty Properties object should be returned instead.
void $obj->setUseTreeOptimizer(bool useTreeOptimizer)
To optimize data. Optimizing the data file will dramatically reduce the
memory foot print and data file loading speed. It is highly recommend to
turn this config on when detecting devices in real-time using DeviceAtlasWeb.
When this config is on, the API will automatically divide the data file into
smaller pieces and cache them on the disk, the cached data will be used for
lookups afterwards. The API detects data file updates and will update the cache.