TOP

Mobi_Mtld_DA_Carrier_CarrierData

This class is responsible for loading the data file and walking the IPV4 Radix Trie to find the properties for a given User-Agent.
Author
DeviceAtlas Limited

Methods

getCopyright

string $obj->getCopyright()

Get data file copyright.

Returns

string
the copyright

getCreationDate

string $obj->getCreationDate()

Get data file creation date.

Returns

string
the creationDate

getProperties

mixed $obj->getProperties(int | string key)

Selects a value for a given IPv4 address, traversing tree and choosing most specific value available for a given address.

Arguments

    key (int | string)
    IPv4 address to look up in integer or string form

Returns

mixed
value at most specific IPv4 network in a tree for a given IPv4 address

getPropertyNames

array $obj->getPropertyNames()

Return a list of all the property names.

Returns

array
array of property names

getPropertyNamesAsStrings

string $obj->getPropertyNamesAsStrings()

Return a list of all the property names.

Returns

string
of property names

getVersion

string $obj->getVersion()

Get data file version.

Returns

string
the version

loadDataFromFile

void $obj->loadDataFromFile(string filePath)

Load carrier data file.

Arguments

    filePath (string)
    carrier data file

Returns

void

Throws

  • Mobi_Mtld_DA_Exception_DataFileException Thrown when the data file can not be opened