public function Reader::close in Smart IP 6.2
Same name in this branch
- 6.2 includes/vendor/geoip2/geoip2/src/Database/Reader.php \GeoIp2\Database\Reader::close()
- 6.2 includes/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php \MaxMind\Db\Reader::close()
Same name and namespace in other branches
- 7.2 includes/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php \MaxMind\Db\Reader::close()
Closes the MaxMind DB and returns resources to the system.
Throws
\Exception if an I/O error occurs.
File
- includes/
vendor/ maxmind-db/ reader/ src/ MaxMind/ Db/ Reader.php, line 287
Class
- Reader
- Instances of this class provide a reader for the MaxMind DB format. IP addresses can be looked up using the <code>get</code> method.
Namespace
MaxMind\DbCode
public function close() {
if (!is_resource($this->fileHandle)) {
throw new \BadMethodCallException('Attempt to close a closed MaxMind DB.');
}
fclose($this->fileHandle);
}