|
| __construct (string $filename, array $locales=['en']) |
| Constructor.
|
|
| anonymousIp (string $ipAddress) |
| This method returns a GeoIP2 Anonymous IP model.
|
|
| asn (string $ipAddress) |
| This method returns a GeoLite2 ASN model.
|
|
| city (string $ipAddress) |
| This method returns a GeoIP2 City model.
|
|
| close () |
| Closes the GeoIP2 database and returns the resources to the system.
|
|
| connectionType (string $ipAddress) |
| This method returns a GeoIP2 Connection Type model.
|
|
| country (string $ipAddress) |
| This method returns a GeoIP2 Country model.
|
|
| domain (string $ipAddress) |
| This method returns a GeoIP2 Domain model.
|
|
| enterprise (string $ipAddress) |
| This method returns a GeoIP2 Enterprise model.
|
|
| isp (string $ipAddress) |
| This method returns a GeoIP2 ISP model.
|
|
| metadata () |
|
◆ __construct()
GeoIp2\Database\Reader::__construct |
( |
string | $filename, |
|
|
array | $locales = ['en'] ) |
Constructor.
- Parameters
-
string | $filename | the path to the GeoIP2 database file |
array | $locales | list of locale codes to use in name property from most preferred to least preferred |
- Exceptions
-
◆ anonymousIp()
GeoIp2\Database\Reader::anonymousIp |
( |
string | $ipAddress | ) |
|
This method returns a GeoIP2 Anonymous IP model.
- Parameters
-
string | $ipAddress | an IPv4 or IPv6 address as a string |
- Exceptions
-
◆ asn()
GeoIp2\Database\Reader::asn |
( |
string | $ipAddress | ) |
|
This method returns a GeoLite2 ASN model.
- Parameters
-
string | $ipAddress | an IPv4 or IPv6 address as a string |
- Exceptions
-
◆ city()
GeoIp2\Database\Reader::city |
( |
string | $ipAddress | ) |
|
This method returns a GeoIP2 City model.
- Parameters
-
string | $ipAddress | an IPv4 or IPv6 address as a string |
- Exceptions
-
Implements GeoIp2\ProviderInterface.
◆ connectionType()
GeoIp2\Database\Reader::connectionType |
( |
string | $ipAddress | ) |
|
This method returns a GeoIP2 Connection Type model.
- Parameters
-
string | $ipAddress | an IPv4 or IPv6 address as a string |
- Exceptions
-
◆ country()
GeoIp2\Database\Reader::country |
( |
string | $ipAddress | ) |
|
This method returns a GeoIP2 Country model.
- Parameters
-
string | $ipAddress | an IPv4 or IPv6 address as a string |
- Exceptions
-
Implements GeoIp2\ProviderInterface.
◆ domain()
GeoIp2\Database\Reader::domain |
( |
string | $ipAddress | ) |
|
This method returns a GeoIP2 Domain model.
- Parameters
-
string | $ipAddress | an IPv4 or IPv6 address as a string |
- Exceptions
-
◆ enterprise()
GeoIp2\Database\Reader::enterprise |
( |
string | $ipAddress | ) |
|
This method returns a GeoIP2 Enterprise model.
- Parameters
-
string | $ipAddress | an IPv4 or IPv6 address as a string |
- Exceptions
-
◆ isp()
GeoIp2\Database\Reader::isp |
( |
string | $ipAddress | ) |
|
This method returns a GeoIP2 ISP model.
- Parameters
-
string | $ipAddress | an IPv4 or IPv6 address as a string |
- Exceptions
-
◆ metadata()
GeoIp2\Database\Reader::metadata |
( |
| ) |
|
- Exceptions
-
InvalidArgumentException | if arguments are passed to the method |
BadMethodCallException | if the database has been closed |
- Return values
-
The documentation for this class was generated from the following file:
- lib/maxmind/GeoIp2/Database/Reader.php