public function Reader::__construct in Smart IP 6.2
Same name in this branch
- 6.2 includes/vendor/geoip2/geoip2/src/Database/Reader.php \GeoIp2\Database\Reader::__construct()
- 6.2 includes/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php \MaxMind\Db\Reader::__construct()
Same name and namespace in other branches
- 7.2 includes/vendor/geoip2/geoip2/src/Database/Reader.php \GeoIp2\Database\Reader::__construct()
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.
Throws
\MaxMind\Db\Reader\InvalidDatabaseException if the database is corrupt or invalid
File
- includes/
vendor/ geoip2/ geoip2/ src/ Database/ Reader.php, line 48
Class
- Reader
- Instances of this class provide a reader for the GeoIP2 database format. IP addresses can be looked up using the database specific methods.
Namespace
GeoIp2\DatabaseCode
public function __construct($filename, $locales = array(
'en',
)) {
$this->dbReader = new DbReader($filename);
$this->locales = $locales;
}